Performance Profiling

Total processing time: 47 ms; Peak memory: 2.902 MB. Show Profiling Timeline

总计7条数据
TimeDurationCategoryInfo
  
15:08:52.11721.0 msyii\db\Command::query(SELECT DISTINCT a.client_id, a.end_at - a.start_at AS hours_spent, a.created_by, a.start_at, a.end_at, a.created_at, a.location_id, CASE WHEN a.location_in_id IS NOT NULL THEN lin.geolocation[0] ELSE lout.geolocation[0] END AS lng, CASE WHEN a.location_in_id IS NOT NULL THEN lin.geolocation[1] ELSE lout.geolocation[1] END AS lat, 1 AS type, CASE WHEN p.id IS NULL THEN false ELSE true END AS cooperated, c.name AS client_name, ct.name AS client_type_name, cc.name AS client_class_name, sales.name AS sales_rep_name, lin.address, a.indistance, d.name AS department_name, u.name AS name, meta.meta_value AS avatar FROM "a57be577deb434"."tbl_work_logs" "a" LEFT JOIN "a57be577deb434"."tbl_location" "lin" ON a.location_in_id = lin.id LEFT JOIN "a57be577deb434"."tbl_location" "lout" ON a.location_out_id = lout.id LEFT JOIN "a57be577deb434"."tbl_users" "u" ON a.created_by = u.id LEFT JOIN "a57be577deb434"."tbl_departments" "d" ON u.department_id = d.id LEFT JOIN "a57be577deb434"."tbl_clients" "c" ON c.id = a.client_id LEFT JOIN "a57be577deb434"."tbl_projects" "p" ON p.client_id = c.id AND p.project_status = 3 LEFT JOIN "a57be577deb434"."tbl_client_classes" "cc" ON cc.id = c.client_class LEFT JOIN "a57be577deb434"."tbl_client_types" "ct" ON ct.id = c.client_type LEFT JOIN "a57be577deb434"."tbl_users" "sales" ON c.sales_rep = sales.id LEFT JOIN "a57be577deb434"."tbl_user_meta" "meta" ON meta.user_id = u.id and meta.meta_key = 'avatar' WHERE ("a"."client_id" IS NOT NULL) AND ((a.location_in_id IS NOT NULL) OR (a.location_out_id IS NOT NULL)) AND ("a"."created_by"='1000') AND ("a"."start_at" >= '2025-07-01 00:00:00') AND ("a"."start_at" <= '2025-07-31 23:59:59') GROUP BY "a"."id", "lin"."id", "lout"."id", "p"."id", "ct"."id", "sales"."id", "cc"."id", "d"."id", "u"."id", "c"."id", "meta"."meta_value") UNION ALL ( SELECT DISTINCT a.client_id, a.end_at - a.start_at AS hours_spent, a.created_by, a.start_at, a.end_at, a.created_at, a.location_id, CASE WHEN a.location_in_id IS NOT NULL THEN lin.geolocation[0] ELSE lout.geolocation[0] END AS lng, CASE WHEN a.location_in_id IS NOT NULL THEN lin.geolocation[1] ELSE lout.geolocation[1] END AS lat, 2 AS type, CASE WHEN p.id IS NULL THEN false ELSE true END AS cooperated, c.name AS client_name, ct.name AS client_type_name, cc.name AS client_class_name, sales.name AS sales_rep_name, lin.address, a.indistance, d.name AS department_name, u.name AS name, meta.meta_value AS avatar FROM "a57be577deb434"."tbl_pre_sales" "a" LEFT JOIN "a57be577deb434"."tbl_location" "lin" ON a.location_in_id = lin.id LEFT JOIN "a57be577deb434"."tbl_location" "lout" ON a.location_out_id = lout.id LEFT JOIN "a57be577deb434"."tbl_users" "u" ON a.created_by = u.id LEFT JOIN "a57be577deb434"."tbl_departments" "d" ON u.department_id = d.id LEFT JOIN "a57be577deb434"."tbl_clients" "c" ON c.id = a.client_id LEFT JOIN "a57be577deb434"."tbl_projects" "p" ON p.client_id = c.id AND p.project_status = 3 LEFT JOIN "a57be577deb434"."tbl_client_classes" "cc" ON cc.id = c.client_class LEFT JOIN "a57be577deb434"."tbl_client_types" "ct" ON ct.id = c.client_type LEFT JOIN "a57be577deb434"."tbl_users" "sales" ON c.sales_rep = sales.id LEFT JOIN "a57be577deb434"."tbl_user_meta" "meta" ON meta.user_id = u.id and meta.meta_key = 'avatar' WHERE ("a"."client_id" IS NOT NULL) AND ((a.location_in_id IS NOT NULL) OR (a.location_out_id IS NOT NULL)) AND ("a"."created_by"='1000') AND ("a"."start_at" >= '2025-07-01 00:00:00') AND ("a"."start_at" <= '2025-07-31 23:59:59') GROUP BY "a"."id", "lin"."id", "lout"."id", "p"."id", "ct"."id", "sales"."id", "cc"."id", "d"."id", "u"."id", "c"."id", "meta"."meta_value" ) UNION ALL ( SELECT DISTINCT a.client_id, a.left_at - a.arrived_at AS hours_spent, a.created_by, a.arrived_at AS start_at, a.left_at AS end_at, a.created_at, a.location_id, CASE WHEN a.location_in_id IS NOT NULL THEN lin.geolocation[0] ELSE lout.geolocation[0] END AS lng, CASE WHEN a.location_in_id IS NOT NULL THEN lin.geolocation[1] ELSE lout.geolocation[1] END AS lat, 3 AS type, CASE WHEN p.id IS NULL THEN false ELSE true END AS cooperated, c.name AS client_name, ct.name AS client_type_name, cc.name AS client_class_name, sales.name AS sales_rep_name, lin.address, a.indistance, d.name AS department_name, u.name AS name, meta.meta_value AS avatar FROM "a57be577deb434"."tbl_implement_records" "a" LEFT JOIN "a57be577deb434"."tbl_location" "lin" ON a.location_in_id = lin.id LEFT JOIN "a57be577deb434"."tbl_location" "lout" ON a.location_out_id = lout.id LEFT JOIN "a57be577deb434"."tbl_users" "u" ON a.created_by = u.id LEFT JOIN "a57be577deb434"."tbl_departments" "d" ON u.department_id = d.id LEFT JOIN "a57be577deb434"."tbl_clients" "c" ON c.id = a.client_id LEFT JOIN "a57be577deb434"."tbl_projects" "p" ON p.client_id = c.id AND p.project_status = 3 LEFT JOIN "a57be577deb434"."tbl_client_classes" "cc" ON cc.id = c.client_class LEFT JOIN "a57be577deb434"."tbl_client_types" "ct" ON ct.id = c.client_type LEFT JOIN "a57be577deb434"."tbl_users" "sales" ON c.sales_rep = sales.id LEFT JOIN "a57be577deb434"."tbl_user_meta" "meta" ON meta.user_id = u.id and meta.meta_key = 'avatar' WHERE ("a"."client_id" IS NOT NULL) AND ((a.location_in_id IS NOT NULL) OR (a.location_out_id IS NOT NULL)) AND ("a"."created_by"='1000') AND ("a"."arrived_at" >= '2025-07-01 00:00:00') AND ("a"."arrived_at" <= '2025-07-31 23:59:59') GROUP BY "a"."id", "lin"."id", "lout"."id", "p"."id", "ct"."id", "sales"."id", "cc"."id", "d"."id", "u"."id", "c"."id", "meta"."meta_value" )
15:08:52.1044.4 msyii\db\Connection::openOpening DB connection: pgsql:host=postgresql.server.local;port=5432;dbname=beta
15:08:52.1083.5 msyii\db\Command::querySELECT * FROM "global"."vw_user_login" WHERE "access_token"='Ll7CI5iYtgVyQJHl2tkvnIHNJc9_fUfd'
15:08:52.1443.1 msyii\db\Command::queryINSERT INTO "global"."tbl_api_log" ("code", "schema", "user_id", "device_type", "version_code", "url", "request", "response", "php_error", "time") VALUES (200, 'a57be577deb434', 1000, 6, 166, 'v2/foot-print/list', '{"user_id":"1000","month":"2025-07","is_active":"0","posttime":"1751612931","access_token":"Ll7CI5iYtgVyQJHl2tkvnIHNJc9_fUfd","device_type":"6","version_code":"166","token":"b023b4bd4b32221f98a31d2d74668f94"}', '{"code":200,"data":{"list":[{"client_id":2815,"hours_spent":"00:00:36","created_by":1000,"start_at":"2025-07-04 14:16:00","end_at":"2025-07-04 14:17:00","created_at":"2025-07-04 14:16:00","location_id":null,"lng":"116.28903","lat":"39.960424","type":1,"cooperated":false,"client_name":"\u4e2d\u56fd\u9ec4\u91d1","client_type_name":"\u592e\u4f01","client_class_name":"\u76ee\u6807\u5ba2\u6237","sales_rep_name":"\u4f0a\u5cfb\u8fb0","address":"\u5317\u4eac\u5e02\u6d77\u6dc0\u533a\u897f\u9876\u8def2\u53f7\u9760\u8fd1\u91d1\u6e90\u65f6\u4ee3\u5546\u52a1\u4e2d\u5fc3","indistance":968,"department_name":"\u8f6f\u4ef6\u5f00\u53d1","name":"\u66f9\u6c38\u751f","avatar":"\/files\/cdn\/a57be577deb434\/avatar\/e1ebc7f0-3c0e-38f8-a847-b9169d50c361.jpg","hours_spent_display":"0\u5206\u949f"},{"client_id":3337,"hours_spent":"00:02:00","created_by":1000,"start_at":"2025-07-04 10:59:00","end_at":"2025-07-04 11:01:00","created_at":"2025-07-04 10:59:00","location_id":null,"lng":"116.289174804688","lat":"39.9604258897569","type":1,"cooperated":false,"client_name":"\u6d77\u57fa\u4f1a\u57fa\u91d1\u4f1a","client_type_name":"\u653f\u5e9c","client_class_name":"\u7a33\u5b9a\u5ba2\u6237","sales_rep_name":"\u970d\u536b\u8d85","address":"\u5317\u4eac\u5e02\u6d77\u6dc0\u533a\u84dd\u975b\u5382\u4e1c\u8def\u9760\u8fd1\u5317\u4eac\u4e16\u7eaa\u661f\u8c6a\u9152\u5e97","indistance":47,"department_name":"\u8f6f\u4ef6\u5f00\u53d1","name":"\u66f9\u6c38\u751f","avatar":"\/files\/cdn\/a57be577deb434\/avatar\/e1ebc7f0-3c0e-38f8-a847-b9169d50c361.jpg","hours_spent_display":"2\u5206\u949f"}],"systemTime":1751612932,"thisUser":{"id":1000,"name":"\u66f9\u6c38\u751f","sex":"F","created_at":"2017-02-06 12:39:24","avatar":{"id":1,"user_id":1000,"name":"\/files\/cdn\/a57be577deb434\/avatar\/e1ebc7f0-3c0e-38f8-a847-b9169d50c361.jpg"}},"yearList":[2017,2018,2019,2020,2021,2022,2023,2024,2025],"thisTime":"2025-07-31 23:59:59","thisTimestamp":1753977599},"status":1,"msg":[{"name":"success","success":"\u6210\u529f\u83b7\u53d6\u6570\u636e","error":""}]}', FALSE, '2025-07-04 15:08:52') RETURNING "id"
15:08:52.1402.5 msyii\db\Command::querySELECT "id", "name", "sex", "created_at" FROM "a57be577deb434"."tbl_users" WHERE "id"='1000'
15:08:52.1131.6 msyii\db\Command::querySELECT * FROM "a57be577deb434"."tbl_users" WHERE "id"=1000
15:08:52.1430.3 msyii\db\Command::querySELECT "id", "user_id", "meta_value" AS "name" FROM "a57be577deb434"."tbl_user_meta" WHERE ("meta_key"='avatar') AND ("user_id"=1000)