explain.depesz.com

PostgreSQL's explain analyze made readable

Result: TcEPM

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 1.428 ↓ 0.0 0 1

Limit (cost=4.39..10.73 rows=1 width=3,209) (actual time=1.428..1.428 rows=0 loops=1)

2.          

Initplan (for Limit)

3. 0.956 1.426 ↓ 0.0 0 1

Nested Loop Semi Join (cost=0.00..1,525.75 rows=1,053 width=0) (actual time=1.426..1.426 rows=0 loops=1)

  • Join Filter: (_sp.representativeid = _b.orgstructid)
4. 0.470 0.470 ↑ 1.0 2,631 1

Seq Scan on kx_kq_storerepresentative _sp (cost=0.00..116.45 rows=2,633 width=8) (actual time=0.008..0.470 rows=2,631 loops=1)

  • Filter: (platstatus = 1)
  • Rows Removed by Filter: 1,973
5. 0.000 0.000 ↓ 0.0 0 2,631

Materialize (cost=0.00..698.43 rows=18 width=8) (actual time=0.000..0.000 rows=0 loops=2,631)

6. 0.000 0.630 ↓ 0.0 0 1

Nested Loop (cost=0.00..698.34 rows=18 width=8) (actual time=0.630..0.630 rows=0 loops=1)

  • Join Filter: ((_b.tn_codepath)::text ~~ ((pl_parentmember.tn_codepath)::text || '%'::text))
7. 0.630 0.630 ↓ 0.0 0 1

Seq Scan on pl_parentmember (cost=0.00..326.89 rows=1 width=55) (actual time=0.630..0.630 rows=0 loops=1)

  • Filter: ((platstatus = 1) AND (orgstructid = '1249573380248702976'::bigint))
  • Rows Removed by Filter: 3,593
8. 0.000 0.000 ↓ 0.0 0

Seq Scan on pl_parentmember _b (cost=0.00..317.91 rows=3,569 width=63) (never executed)

  • Filter: (platstatus = 1)
9. 1.428 1.428 ↓ 0.0 0 1

Result (cost=2.94..3,177,585.34 rows=501,287 width=3,209) (actual time=1.428..1.428 rows=0 loops=1)

  • One-Time Filter: $0
10. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=2.94..3,177,585.34 rows=501,287 width=3,209) (never executed)

  • Join Filter: (sar.storeid = ks.id)
11. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=2.94..3,147,489.11 rows=501,287 width=2,695) (never executed)

12. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=2.66..2,993,399.52 rows=501,287 width=2,656) (never executed)

13. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=2.38..2,843,795.88 rows=501,287 width=2,648) (never executed)

  • Join Filter: (kx_salearea.saleareaid = ks.kxsaleareaid)
14. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=2.38..2,836,275.56 rows=501,287 width=2,624) (never executed)

15. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=2.10..2,676,825.18 rows=501,287 width=2,611) (never executed)

  • Join Filter: (ks.kaid = ka.id)
16. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=2.10..2,669,303.27 rows=501,287 width=2,193) (never executed)

  • Join Filter: ((sl.codepath)::text ~~ ((csq.codepath)::text || '%'::text))
17. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=2.10..914,031.77 rows=187,397 width=2,267) (never executed)

18. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=1.82..856,231.19 rows=187,397 width=2,251) (never executed)

19. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=1.54..799,573.23 rows=187,397 width=2,212) (never executed)

20. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=1.26..741,772.65 rows=187,397 width=2,196) (never executed)

21. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=0.98..683,972.08 rows=187,397 width=2,180) (never executed)

22. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=0.71..626,171.50 rows=187,397 width=2,164) (never executed)

  • Join Filter: ((sl.codepath)::text ~~ ((sj.codepath)::text || '%'::text))
23. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=0.71..87,575.95 rows=187,397 width=2,151) (never executed)

  • Join Filter: ((sl.codepath)::text ~~ ((dq.codepath)::text || '%'::text))
24. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=0.71..76,971.85 rows=187,397 width=2,138) (never executed)

25. 0.000 0.000 ↓ 0.0 0

Index Scan Backward using idx_kx_kq_store_createtime on kx_kq_store ks (cost=0.42..17,364.23 rows=187,397 width=1,946) (never executed)

  • Filter: (((isself IS NULL) OR (isself = 0)) AND (status = 1) AND (platstatus = 1))
26. 0.000 0.000 ↓ 0.0 0

Index Scan using pl_orgstruct_pkey on pl_orgstruct sl (cost=0.29..0.32 rows=1 width=200) (never executed)

  • Index Cond: (ks.seleareaid = orgstructid)
  • Filter: (platstatus = 1)
27. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..765.76 rows=3 width=100) (never executed)

28. 0.000 0.000 ↓ 0.0 0

Seq Scan on pl_orgstruct dq (cost=0.00..765.75 rows=3 width=100) (never executed)

  • Filter: ((orgtypeid = 2) AND (platstatus = 1))
29. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..766.57 rows=164 width=100) (never executed)

30. 0.000 0.000 ↓ 0.0 0

Seq Scan on pl_orgstruct sj (cost=0.00..765.75 rows=164 width=100) (never executed)

  • Filter: ((orgtypeid = 3) AND (platstatus = 1))
31. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_pl_dictionary_dickey on pl_dictionary ct (cost=0.28..0.30 rows=1 width=24) (never executed)

  • Index Cond: (ks.channeltype = dickey)
  • Filter: (platstatus = 1)
32. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_pl_dictionary_dickey on pl_dictionary st (cost=0.28..0.30 rows=1 width=24) (never executed)

  • Index Cond: (ks.storetype = dickey)
  • Filter: (platstatus = 1)
33. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_pl_dictionary_dickey on pl_dictionary sle (cost=0.28..0.30 rows=1 width=24) (never executed)

  • Index Cond: (ks.storelevel = dickey)
  • Filter: (platstatus = 1)
34. 0.000 0.000 ↓ 0.0 0

Index Scan using index_region_regionid on pl_region reg (cost=0.28..0.30 rows=1 width=47) (never executed)

  • Index Cond: (ks.regionid = regionid)
  • Filter: (platstatus = 1)
35. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_pl_dictionary_dickey on pl_dictionary sm (cost=0.28..0.30 rows=1 width=24) (never executed)

  • Index Cond: (ks.supplymode = dickey)
  • Filter: (platstatus = 1)
36. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..768.42 rows=535 width=100) (never executed)

37. 0.000 0.000 ↓ 0.0 0

Seq Scan on pl_orgstruct csq (cost=0.00..765.75 rows=535 width=100) (never executed)

  • Filter: ((orgtypeid = 6) AND (platstatus = 1))
38. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..2.60 rows=1 width=426) (never executed)

39. 0.000 0.000 ↓ 0.0 0

Seq Scan on kx_kq_ka ka (cost=0.00..2.60 rows=1 width=426) (never executed)

  • Filter: (platstatus = 1)
40. 0.000 0.000 ↓ 0.0 0

Index Scan using pl_orgstruct_pkey on pl_orgstruct co (cost=0.29..0.32 rows=1 width=21) (never executed)

  • Index Cond: (orgstructid = ks.createop)
  • Filter: (platstatus = 1)
41. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..1.02 rows=1 width=40) (never executed)

42. 0.000 0.000 ↓ 0.0 0

Seq Scan on kx_salearea (cost=0.00..1.01 rows=1 width=40) (never executed)

  • Filter: (platstatus = 1)
43. 0.000 0.000 ↓ 0.0 0

Index Scan using pl_dictionary_pkey on pl_dictionary pd (cost=0.28..0.30 rows=1 width=24) (never executed)

  • Index Cond: (dictionaryid = ks.tn_two_level)
  • Filter: (platstatus = 1)
44. 0.000 0.000 ↓ 0.0 0

Index Scan using ka_kq_channelcustomers_pkey on ka_kq_channelcustomers kkc (cost=0.28..0.31 rows=1 width=55) (never executed)

  • Index Cond: (id = ks.distributor)
  • Filter: (platstatus = 1)
45. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..19.02 rows=4 width=40) (never executed)

46. 0.000 0.000 ↓ 0.0 0

Seq Scan on kx_store_autotags_result sar (cost=0.00..19.00 rows=4 width=40) (never executed)

  • Filter: (platstatus = 1)
Planning time : 57.722 ms
Execution time : 1.672 ms