https://courier.ohau.co.ke/api/collection/parcels

Query Metrics

3 Database Queries
3 Different statements
44809.14 ms Query time
1 Invalid entities

Grouped Statements

Show all queries

Time Count Info
44806.95 ms
(100.00%)
1
SELECT DISTINCT a.id as id, 
                                a.receiver_name,
                                a.receiver_phone_number,
                                a.sender_name,
                                a.is_collected,
                                a.is_received,
                                a.sender_phone_number,
                                b.station_name as from_station, 
                                c.station_name as to_station,
                                d.amount as amount,
                                (SELECT GROUP_CONCAT(description) from parcel where way_bill_id = a.id) AS parcels,
                                cp.collector_name as collector_name,
                                cp.consignee_national_id as consignee_national_id,
                                a.receiver_name as consignee_name,
                                cp.national_id as national_id,
                                concat(j.first_name,' ',j.second_name,' ', j.sir_name) as sending_clerk,
                                a.created_at as sending_time,
                                concat(h.first_name,' ',h.second_name,' ', h.sir_name) as loading_clerk,                            
                                concat(l.first_name,' ',l.second_name,' ', l.sir_name) as receiving_clerk,
                                concat(n.first_name,' ',n.second_name,' ', n.sir_name) as collector_clerk,
                                concat(p.first_name,' ',p.second_name,' ', p.sir_name) as receiving_clerk_1,
                                a.received_at as received_at_1,
                                dp.received_at as received_at
                              

                                
                    FROM way_bill a 
                        JOIN station b ON b.id = a.from_station_id
                        JOIN station c ON c.id = a.to_station_id
                        JOIN transaction d on a.id = d.way_bill_id 
                        
                        LEFT JOIN collected_parcel cp on a.id = cp.waybill_id
                        LEFT JOIN parcel e on e.way_bill_id = a.id
                        LEFT JOIN delivery_parcel dp on e.id = dp.parcel_id 
                        LEFT JOIN delivery f on f.id = dp.delivery_id
                        
                        LEFT JOIN user g ON g.id = f.loaded_by
                        LEFT JOIN person h on h.id = g.person_id
                        
                        JOIN user i ON i.id = a.created_by
                        JOIN person j on j.id = i.person_id 
                        
                        LEFT JOIN user k ON k.id = dp.received_by
                        LEFT JOIN person l on l.id = k.person_id

                        LEFT JOIN user m ON m.id = cp.created_by
                        LEFT JOIN person n on n.id = m.person_id

                        LEFT JOIN user o ON o.id = a.received_by
                        LEFT JOIN person p on p.id = o.person_id
                    WHERE a.to_station_id = 2 ORDER BY a.is_collected, a.is_received DESC,a.id DESC LIMIT 50
Parameters:
[]
1.32 ms
(0.00%)
1
SELECT t0.id AS id_1, t0.is_active AS is_active_2, t0.created_at AS created_at_3, t0.user AS user_4, t0.station_id AS station_id_5 FROM user_station t0 WHERE t0.user = ? ORDER BY t0.id DESC LIMIT 1
Parameters:
[
  127
]
0.86 ms
(0.00%)
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:
[
  127
]

Database Connections

Name Service
default doctrine.dbal.default_connection

Entity Managers

Name Service
default doctrine.orm.default_entity_manager

Second Level Cache

Second Level Cache is not enabled.

Entities Mapping

Class Mapping errors
App\Entity\User No errors.
App\Entity\Person No errors.
App\Entity\UserStation No errors.
App\Entity\Station No errors.
App\Entity\WayBill
  • The field App\Entity\WayBill#collectedParcel is on the inverse side of a bi-directional relationship, but the specified mappedBy association on the target-entity App\Entity\CollectedParcel#waybill does not contain the required 'inversedBy="collectedParcel"' attribute.