explain.depesz.com

PostgreSQL's explain analyze made readable

Result: P3V9R

Settings
# exclusive inclusive rows x rows loops node
1. 0.823 2,630.795 ↑ 1.0 1 1

Nested Loop (cost=0.87..1,607,460.29 rows=1 width=406) (actual time=2,630.790..2,630.795 rows=1 loops=1)

2. 0.003 0.024 ↑ 1.0 1 1

Nested Loop (cost=0.58..16.62 rows=1 width=38) (actual time=0.020..0.024 rows=1 loops=1)

3. 0.014 0.014 ↑ 1.0 1 1

Index Scan using pl_orgstruct_orgstructid on pl_orgstruct a (cost=0.29..8.31 rows=1 width=24) (actual time=0.012..0.014 rows=1 loops=1)

  • Index Cond: (orgstructid = '1131493128520470528'::bigint)
  • Filter: (userinfoid IS NOT NULL)
4. 0.007 0.007 ↑ 1.0 1 1

Index Scan using pl_orgstruct_orgstructid on pl_orgstruct b (cost=0.29..8.31 rows=1 width=30) (actual time=0.007..0.007 rows=1 loops=1)

  • Index Cond: (orgstructid = a.parentorgstructid)
5. 0.008 0.008 ↑ 1.0 1 1

Index Scan using pl_orgstruct_orgstructid on pl_orgstruct c (cost=0.29..0.54 rows=1 width=151) (actual time=0.008..0.008 rows=1 loops=1)

  • Index Cond: (orgstructid = b.parentorgstructid)
6.          

SubPlan (forNested Loop)

7. 0.029 0.042 ↑ 1.0 1 1

Bitmap Heap Scan on kx_kq_signrecordnew (cost=4.33..27.18 rows=1 width=0) (actual time=0.042..0.042 rows=1 loops=1)

  • Recheck Cond: (userid = a.userinfoid)
  • Filter: (((signtype)::text = '0'::text) AND (to_char((recorddate)::timestamp with time zone, 'YYYY-MM-DD'::text) = '2019-05-28'::text))
  • Rows Removed by Filter: 4
  • Heap Blocks: exact=5
8. 0.013 0.013 ↓ 1.2 7 1

Bitmap Index Scan on idx_kx_kq_signrecordnew_userid (cost=0.00..4.33 rows=6 width=0) (actual time=0.013..0.013 rows=7 loops=1)

  • Index Cond: (userid = a.userinfoid)
9. 0.000 0.000 ↓ 0.0 0

Seq Scan on kx_kq_signrecordnew kx_kq_signrecordnew_1 (cost=0.00..1,549.30 rows=53 width=8) (never executed)

  • Filter: (((signtype)::text = '0'::text) AND (to_char((recorddate)::timestamp with time zone, 'YYYY-MM-DD'::text) = '2019-05-28'::text))
10. 0.010 0.015 ↑ 1.0 1 1

Bitmap Heap Scan on kx_kq_signrecordnew kx_kq_signrecordnew_2 (cost=4.33..27.18 rows=1 width=0) (actual time=0.015..0.015 rows=1 loops=1)

  • Recheck Cond: (userid = a.userinfoid)
  • Filter: (((signtype)::text = '1'::text) AND (to_char((recorddate)::timestamp with time zone, 'YYYY-MM-DD'::text) = '2019-05-28'::text))
  • Rows Removed by Filter: 5
  • Heap Blocks: exact=6
11. 0.005 0.005 ↓ 1.2 7 1

Bitmap Index Scan on idx_kx_kq_signrecordnew_userid (cost=0.00..4.33 rows=6 width=0) (actual time=0.005..0.005 rows=7 loops=1)

  • Index Cond: (userid = a.userinfoid)
12. 0.000 0.000 ↓ 0.0 0

Seq Scan on kx_kq_signrecordnew kx_kq_signrecordnew_3 (cost=0.00..1,549.30 rows=43 width=8) (never executed)

  • Filter: (((signtype)::text = '1'::text) AND (to_char((recorddate)::timestamp with time zone, 'YYYY-MM-DD'::text) = '2019-05-28'::text))
13. 0.000 0.000 ↓ 0.0 0

Seq Scan on kx_workreport_report (cost=0.00..674.14 rows=1 width=0) (never executed)

  • Filter: ((createop = a.orgstructid) AND (to_char(createtime, 'YYYY-MM-DD'::text) = '2019-05-28'::text))
14. 6.413 6.413 ↓ 66.7 2,068 1

Seq Scan on kx_workreport_report kx_workreport_report_1 (cost=0.00..658.41 rows=31 width=8) (actual time=1.677..6.413 rows=2,068 loops=1)

  • Filter: (to_char(createtime, 'YYYY-MM-DD'::text) = '2019-05-28'::text)
  • Rows Removed by Filter: 4201
15. 0.008 1,308.651 ↑ 1.0 1 1

Aggregate (cost=803,356.37..803,356.38 rows=1 width=8) (actual time=1,308.650..1,308.651 rows=1 loops=1)

16. 0.013 1,308.643 ↑ 3.4 5 1

Append (cost=0.00..803,356.33 rows=17 width=0) (actual time=1,308.144..1,308.643 rows=5 loops=1)

17. 0.001 1,139.663 ↓ 0.0 0 1

Subquery Scan on *SELECT* 1 (cost=0.00..683,806.08 rows=12 width=0) (actual time=1,139.662..1,139.663 rows=0 loops=1)

18. 1,139.662 1,139.662 ↓ 0.0 0 1

Seq Scan on kx_kq_storeinandout (cost=0.00..683,805.96 rows=12 width=4) (actual time=1,139.662..1,139.662 rows=0 loops=1)

  • Filter: ((platcreateop = a.orgstructid) AND (to_char(signintime, 'YYYY-MM-DD'::text) = '2019-05-28'::text))
  • Rows Removed by Filter: 22
19. 0.001 168.402 ↓ 0.0 0 1

Subquery Scan on *SELECT* 2 (cost=0.00..119,340.93 rows=1 width=0) (actual time=168.402..168.402 rows=0 loops=1)

20. 168.401 168.401 ↓ 0.0 0 1

Seq Scan on kx_kq_channelinandout (cost=0.00..119,340.93 rows=1 width=4) (actual time=168.401..168.401 rows=0 loops=1)

  • Filter: ((platcreateop = a.orgstructid) AND (to_char(signintime, 'YYYY-MM-DD'::text) = '2019-05-28'::text))
  • Rows Removed by Filter: 381
21. 0.007 0.081 ↓ 4.0 4 1

Subquery Scan on *SELECT* 3 (cost=8.39..57.95 rows=1 width=0) (actual time=0.070..0.081 rows=4 loops=1)

22. 0.056 0.074 ↓ 4.0 4 1

Bitmap Heap Scan on tn_sfa_t_location (cost=8.39..57.94 rows=1 width=4) (actual time=0.063..0.074 rows=4 loops=1)

  • Recheck Cond: (tn_createop = a.orgstructid)
  • Filter: (to_char(tn_createtime, 'YYYY-MM-DD'::text) = '2019-05-28'::text)
  • Rows Removed by Filter: 9
  • Heap Blocks: exact=13
23. 0.018 0.018 ↑ 1.0 13 1

Bitmap Index Scan on tn_sfa_t_location_tn_createop (cost=0.00..8.39 rows=13 width=0) (actual time=0.018..0.018 rows=13 loops=1)

  • Index Cond: (tn_createop = a.orgstructid)
24. 0.002 0.466 ↑ 1.0 1 1

Subquery Scan on *SELECT* 4 (cost=0.00..130.30 rows=1 width=0) (actual time=0.322..0.466 rows=1 loops=1)

25. 0.464 0.464 ↑ 1.0 1 1

Seq Scan on tn_t_marketing_conference (cost=0.00..130.29 rows=1 width=4) (actual time=0.321..0.464 rows=1 loops=1)

  • Filter: ((platcreateop = a.orgstructid) AND (to_char(tn_creation_time, 'YYYY-MM-DD'::text) = '2019-05-28'::text))
  • Rows Removed by Filter: 247
26. 0.000 0.007 ↓ 0.0 0 1

Subquery Scan on *SELECT* 5 (cost=0.00..10.36 rows=1 width=0) (actual time=0.007..0.007 rows=0 loops=1)

27. 0.007 0.007 ↓ 0.0 0 1

Seq Scan on tn_sfat_modelfieidreturn (cost=0.00..10.35 rows=1 width=4) (actual time=0.006..0.007 rows=0 loops=1)

  • Filter: ((platcreateop = a.orgstructid) AND (to_char(tn_visitdate, 'YYYY-MM-DD'::text) = '2019-05-28'::text))
  • Rows Removed by Filter: 3
28. 0.001 0.011 ↓ 0.0 0 1

Subquery Scan on *SELECT* 6 (cost=0.00..10.71 rows=1 width=0) (actual time=0.011..0.011 rows=0 loops=1)

29. 0.010 0.010 ↓ 0.0 0 1

Seq Scan on tn_sfa_t_modelfieldvisit (cost=0.00..10.70 rows=1 width=4) (actual time=0.010..0.010 rows=0 loops=1)

  • Filter: ((platcreateop = a.orgstructid) AND (to_char(tn_visitdate, 'YYYY-MM-DD'::text) = '2019-05-28'::text))
  • Rows Removed by Filter: 9
30. 0.002 1,314.222 ↓ 0.0 0 1

GroupAggregate (cost=803,147.49..803,147.81 rows=13 width=64) (actual time=1,314.222..1,314.222 rows=0 loops=1)

  • Group Key: (to_char(kx_kq_storeinandout_1.signintime, 'YYYY-MM-DD'::text))
31. 0.013 1,314.220 ↓ 0.0 0 1

Sort (cost=803,147.49..803,147.52 rows=13 width=64) (actual time=1,314.219..1,314.220 rows=0 loops=1)

  • Sort Key: (to_char(kx_kq_storeinandout_1.signintime, 'YYYY-MM-DD'::text))
  • Sort Method: quicksort Memory: 25kB
32. 0.001 1,314.207 ↓ 0.0 0 1

Result (cost=0.00..803,147.24 rows=13 width=64) (actual time=1,314.207..1,314.207 rows=0 loops=1)

33. 0.005 1,314.206 ↓ 0.0 0 1

Append (cost=0.00..803,147.11 rows=13 width=64) (actual time=1,314.205..1,314.206 rows=0 loops=1)

34. 1,145.528 1,145.528 ↓ 0.0 0 1

Seq Scan on kx_kq_storeinandout kx_kq_storeinandout_1 (cost=0.00..683,806.05 rows=12 width=64) (actual time=1,145.527..1,145.528 rows=0 loops=1)

  • Filter: ((platcreateop = a.orgstructid) AND (to_char(signintime, 'YYYY-MM-DD'::text) = '2019-05-28'::text))
  • Rows Removed by Filter: 22
35. 168.673 168.673 ↓ 0.0 0 1

Seq Scan on kx_kq_channelinandout kx_kq_channelinandout_1 (cost=0.00..119,340.93 rows=1 width=64) (actual time=168.673..168.673 rows=0 loops=1)

  • Filter: ((platcreateop = a.orgstructid) AND (to_char(signintime, 'YYYY-MM-DD'::text) = '2019-05-28'::text))
  • Rows Removed by Filter: 381
36. 0.023 0.101 ↑ 1.0 1 1

GroupAggregate (cost=8.39..58.00 rows=1 width=64) (actual time=0.101..0.101 rows=1 loops=1)

  • Group Key: to_char(tn_sfa_t_location_1.tn_createtime, 'YYYY-MM-DD'::text)
37. 0.060 0.078 ↓ 4.0 4 1

Bitmap Heap Scan on tn_sfa_t_location tn_sfa_t_location_1 (cost=8.39..57.97 rows=1 width=248) (actual time=0.066..0.078 rows=4 loops=1)

  • Recheck Cond: (tn_createop = a.orgstructid)
  • Filter: (((tn_locationphone)::text <> ''::text) AND (to_char(tn_createtime, 'YYYY-MM-DD'::text) = '2019-05-28'::text))
  • Rows Removed by Filter: 9
  • Heap Blocks: exact=13
38. 0.018 0.018 ↑ 1.0 13 1

Bitmap Index Scan on tn_sfa_t_location_tn_createop (cost=0.00..8.39 rows=13 width=0) (actual time=0.018..0.018 rows=13 loops=1)

  • Index Cond: (tn_createop = a.orgstructid)
39. 0.012 0.478 ↑ 1.0 1 1

GroupAggregate (cost=0.00..130.32 rows=1 width=64) (actual time=0.477..0.478 rows=1 loops=1)

  • Group Key: to_char(tn_t_marketing_conference_1.tn_creation_time, 'YYYY-MM-DD'::text)
40. 0.466 0.466 ↑ 1.0 1 1

Seq Scan on tn_t_marketing_conference tn_t_marketing_conference_1 (cost=0.00..130.29 rows=1 width=608) (actual time=0.316..0.466 rows=1 loops=1)

  • Filter: ((platcreateop = a.orgstructid) AND (to_char(tn_creation_time, 'YYYY-MM-DD'::text) = '2019-05-28'::text))
  • Rows Removed by Filter: 247
41. 0.000 0.008 ↓ 0.0 0 1

GroupAggregate (cost=0.00..10.38 rows=1 width=64) (actual time=0.008..0.008 rows=0 loops=1)

  • Group Key: to_char(tn_sfat_modelfieidreturn_1.tn_visitdate, 'YYYY-MM-DD'::text)
42. 0.008 0.008 ↓ 0.0 0 1

Seq Scan on tn_sfat_modelfieidreturn tn_sfat_modelfieidreturn_1 (cost=0.00..10.35 rows=1 width=64) (actual time=0.008..0.008 rows=0 loops=1)

  • Filter: ((platcreateop = a.orgstructid) AND (to_char(tn_visitdate, 'YYYY-MM-DD'::text) = '2019-05-28'::text))
  • Rows Removed by Filter: 3
43. 0.000 0.010 ↓ 0.0 0 1

GroupAggregate (cost=0.00..10.73 rows=1 width=64) (actual time=0.010..0.010 rows=0 loops=1)

  • Group Key: to_char(tn_sfa_t_modelfieldvisit_1.tn_visitdate, 'YYYY-MM-DD'::text)
44. 0.010 0.010 ↓ 0.0 0 1

Seq Scan on tn_sfa_t_modelfieldvisit tn_sfa_t_modelfieldvisit_1 (cost=0.00..10.70 rows=1 width=64) (actual time=0.010..0.010 rows=0 loops=1)

  • Filter: ((platcreateop = a.orgstructid) AND (to_char(tn_visitdate, 'YYYY-MM-DD'::text) = '2019-05-28'::text))
  • Rows Removed by Filter: 9
Planning time : 1.498 ms
Execution time : 2,631.080 ms