https://sys.nenocourier.co.ke/api/sms/failed/2/1435965

Query Metrics

6 Database Queries
6 Different statements
2084.66 ms Query time
1 Invalid entities
  • Grouped Statements
  • Database Connections
  • Entity Managers
  • Second Level Cache
  • Entities Mapping

Show all queries

Time Count Info
2077.18 ms
(99.64%)
1
select  ANY_VALUE(c.id) as sms_id, a.id as waybill,a.receiver_name,a.receiver_phone_number,a.sender_name, a.sender_phone_number,ANY_VALUE(c.recepient) as receipient,ANY_VALUE(c.sms) as sms ,c.status,ANY_VALUE(c.status_code) as status_code,ANY_VALUE(c.created_at) as created_at,
                    ( select description from parcel where way_bill_id= a.id limit 1) as description      
                from sms c 
                    JOIN transaction b on b.id = c.transaction_id 
                    JOIN way_bill a ON b.way_bill_id = a.id
            WHERE c.recepient = concat('+254',substr(Replace(a.receiver_phone_number,' ',''),2))
              AND c.status = 'Failed' 
              AND c.action = 'receiving'
              AND a.to_station_id = 2 
              AND (c.manually_sent= 0 or c.manually_sent IS NULL)  
              AND date(c.created_at) >= DATE_SUB(cast(now() as date),INTERVAL 5 DAY) group by c.transaction_id  order by c.transaction_id desc
Parameters:
[]
4.38 ms
(0.21%)
1
"COMMIT"
Parameters:
[]
1.17 ms
(0.06%)
1
SELECT t0.id AS id_1, t0.username AS username_2, t0.password AS password_3, t0.created_at AS created_at_4, t0.roles AS roles_5, t0.email AS email_6, t0.person_id AS person_id_7 FROM user t0 WHERE t0.id = ? LIMIT 1
Parameters:
0 of 0
[ 40 ]
1.00 ms
(0.05%)
1
SELECT t0.id AS id_1, t0.status AS status_2, t0.amount AS amount_3, t0.sms AS sms_4, t0.recepient AS recepient_5, t0.created_at AS created_at_6, t0.status_code AS status_code_7, t0.manually_sent AS manually_sent_8, t0.action AS action_9, t0.message_id AS message_id_10, t0.transaction_id AS transaction_id_11, t0.organization_id AS organization_id_12, t0.created_by AS created_by_13 FROM sms t0 WHERE t0.id = ? LIMIT 1
Parameters:
0 of 0
[ "1435965" ]
0.62 ms
(0.03%)
1
UPDATE sms SET manually_sent = ? WHERE id = ?
Parameters:
0 of 0
[ 1 1435965 ]
0.31 ms
(0.01%)
1
"START TRANSACTION"
Parameters:
[]