explain.depesz.com

PostgreSQL's explain analyze made readable

Result: PVSX

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

Sort (cost=45,820.68..45,820.68 rows=1 width=1,481) (actual rows= loops=)

  • Sort Key: "*SELECT* 1".createtime DESC, "*SELECT* 1".id DESC
2. 0.000 0.000 ↓ 0.0

Nested Loop Anti Join (cost=1,290.79..45,820.67 rows=1 width=1,481) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,290.50..45,236.91 rows=1 width=1,358) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,290.22..45,236.55 rows=1 width=1,356) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,289.94..45,236.22 rows=1 width=1,346) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1,289.66..45,235.78 rows=1 width=1,185) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,289.52..45,235.62 rows=1 width=775) (actual rows= loops=)

  • Join Filter: ("*SELECT* 1".id = kb.costid)
8. 0.000 0.000 ↓ 0.0

Seq Scan on kx_cost_batch kb (cost=0.00..1,191.88 rows=1 width=33) (actual rows= loops=)

  • Filter: ((platstatus = 1) AND ((batchcode)::text = 'PC20200623033473'::text))
9. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,289.52..43,947.16 rows=7,726 width=742) (actual rows= loops=)

  • Hash Cond: ("*SELECT* 1".contractid = kccc.contractid)
10. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1,026.71..43,664.05 rows=7,726 width=730) (actual rows= loops=)

  • Hash Cond: ("*SELECT* 1".createop = m.orgstructid)
11. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=403.24..43,020.29 rows=7,726 width=723) (actual rows= loops=)

  • Hash Cond: ("*SELECT* 1".costsubject = ksub3.id)
12. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=394.81..42,991.14 rows=7,726 width=702) (actual rows= loops=)

  • Hash Cond: ("*SELECT* 1".activitymode = ksub2.id)
13. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=386.38..42,962.00 rows=7,726 width=689) (actual rows= loops=)

  • Hash Cond: ("*SELECT* 1".costmodel = ksub1.id)
14. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=377.95..42,932.85 rows=7,726 width=668) (actual rows= loops=)

  • Hash Cond: ("*SELECT* 1".paytype = tpm.dickey)
15. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=304.69..42,753.37 rows=7,726 width=660) (actual rows= loops=)

  • Hash Cond: ("*SELECT* 1".category = tc.dickey)
16. 0.000 0.000 ↓ 0.0

Append (cost=231.44..42,573.88 rows=7,726 width=644) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 1 (cost=231.44..38,262.16 rows=2,232 width=687) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=231.44..38,239.84 rows=2,232 width=1,137) (actual rows= loops=)

  • Hash Cond: (kp.third_category = ct.dickey)
19. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=154.53..38,121.13 rows=2,232 width=647) (actual rows= loops=)

  • Hash Cond: (kkc.channeltype = kcp.dickey)
20. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=77.61..38,013.60 rows=2,232 width=639) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=77.33..37,265.67 rows=2,232 width=599) (actual rows= loops=)

  • Hash Cond: (ks.storetype = kst.dickey)
22. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.42..37,162.22 rows=2,232 width=591) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Seq Scan on kx_cost_plan kp (cost=0.00..3,120.82 rows=13,485 width=387) (actual rows= loops=)

  • Filter: ((customertype = '905324680615956480'::bigint) AND (platstatus = 1))
24. 0.000 0.000 ↓ 0.0

Index Scan using kx_kq_store_pkey on kx_kq_store ks (cost=0.42..2.52 rows=1 width=212) (actual rows= loops=)

  • Index Cond: (id = kp.customerid)
  • Filter: (platstatus = 1)
25. 0.000 0.000 ↓ 0.0

Hash (cost=58.48..58.48 rows=1,475 width=24) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Seq Scan on pl_dictionary kst (cost=0.00..58.48 rows=1,475 width=24) (actual rows= loops=)

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

Index Scan using ka_kq_channelcustomers_pkey on ka_kq_channelcustomers kkc (cost=0.28..0.34 rows=1 width=56) (actual rows= loops=)

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

Hash (cost=58.48..58.48 rows=1,475 width=24) (actual rows= loops=)

29. 0.000 0.000 ↓ 0.0

Seq Scan on pl_dictionary kcp (cost=0.00..58.48 rows=1,475 width=24) (actual rows= loops=)

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

Hash (cost=58.48..58.48 rows=1,475 width=24) (actual rows= loops=)

31. 0.000 0.000 ↓ 0.0

Seq Scan on pl_dictionary ct (cost=0.00..58.48 rows=1,475 width=24) (actual rows= loops=)

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

Subquery Scan on *SELECT* 2 (cost=906.70..4,311.71 rows=5,494 width=627) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=906.70..4,256.77 rows=5,494 width=1,077) (actual rows= loops=)

  • Hash Cond: (kp_1.third_category = ct_1.dickey)
34. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=829.79..4,076.96 rows=5,494 width=459) (actual rows= loops=)

  • Hash Cond: (kkc_1.channeltype = kcp_1.dickey)
35. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=752.88..3,924.67 rows=5,494 width=451) (actual rows= loops=)

  • Hash Cond: (kp_1.contractid = kccc_1.contractid)
36. 0.000 0.000 ↓ 0.0

Hash Join (cost=480.12..3,637.49 rows=5,494 width=443) (actual rows= loops=)

  • Hash Cond: (kp_1.customerid = kkc_1.id)
37. 0.000 0.000 ↓ 0.0

Seq Scan on kx_cost_plan kp_1 (cost=0.00..3,120.82 rows=13,920 width=387) (actual rows= loops=)

  • Filter: ((customertype = '905324761813487616'::bigint) AND (platstatus = 1))
38. 0.000 0.000 ↓ 0.0

Hash (cost=431.06..431.06 rows=3,925 width=64) (actual rows= loops=)

39. 0.000 0.000 ↓ 0.0

Seq Scan on ka_kq_channelcustomers kkc_1 (cost=0.00..431.06 rows=3,925 width=64) (actual rows= loops=)

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

Hash (cost=217.56..217.56 rows=4,415 width=16) (actual rows= loops=)

41. 0.000 0.000 ↓ 0.0

Seq Scan on kx_channelorg_contract kccc_1 (cost=0.00..217.56 rows=4,415 width=16) (actual rows= loops=)

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

Hash (cost=58.48..58.48 rows=1,475 width=24) (actual rows= loops=)

43. 0.000 0.000 ↓ 0.0

Seq Scan on pl_dictionary kcp_1 (cost=0.00..58.48 rows=1,475 width=24) (actual rows= loops=)

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

Hash (cost=58.48..58.48 rows=1,475 width=24) (actual rows= loops=)

45. 0.000 0.000 ↓ 0.0

Seq Scan on pl_dictionary ct_1 (cost=0.00..58.48 rows=1,475 width=24) (actual rows= loops=)

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

Hash (cost=54.78..54.78 rows=1,478 width=24) (actual rows= loops=)

47. 0.000 0.000 ↓ 0.0

Seq Scan on pl_dictionary tc (cost=0.00..54.78 rows=1,478 width=24) (actual rows= loops=)

48. 0.000 0.000 ↓ 0.0

Hash (cost=54.78..54.78 rows=1,478 width=24) (actual rows= loops=)

49. 0.000 0.000 ↓ 0.0

Seq Scan on pl_dictionary tpm (cost=0.00..54.78 rows=1,478 width=24) (actual rows= loops=)

50. 0.000 0.000 ↓ 0.0

Hash (cost=7.08..7.08 rows=108 width=29) (actual rows= loops=)

51. 0.000 0.000 ↓ 0.0

Seq Scan on kx_budget_subject ksub1 (cost=0.00..7.08 rows=108 width=29) (actual rows= loops=)

52. 0.000 0.000 ↓ 0.0

Hash (cost=7.08..7.08 rows=108 width=29) (actual rows= loops=)

53. 0.000 0.000 ↓ 0.0

Seq Scan on kx_budget_subject ksub2 (cost=0.00..7.08 rows=108 width=29) (actual rows= loops=)

54. 0.000 0.000 ↓ 0.0

Hash (cost=7.08..7.08 rows=108 width=29) (actual rows= loops=)

55. 0.000 0.000 ↓ 0.0

Seq Scan on kx_budget_subject ksub3 (cost=0.00..7.08 rows=108 width=29) (actual rows= loops=)

56. 0.000 0.000 ↓ 0.0

Hash (cost=549.32..549.32 rows=5,932 width=23) (actual rows= loops=)

57. 0.000 0.000 ↓ 0.0

Seq Scan on pl_orgstruct m (cost=0.00..549.32 rows=5,932 width=23) (actual rows= loops=)

58. 0.000 0.000 ↓ 0.0

Hash (cost=206.25..206.25 rows=4,525 width=28) (actual rows= loops=)

59. 0.000 0.000 ↓ 0.0

Seq Scan on kx_channelorg_contract kccc (cost=0.00..206.25 rows=4,525 width=28) (actual rows= loops=)

60. 0.000 0.000 ↓ 0.0

Index Scan using pk_kx_salebranchorg_1 on kx_salebranchorg ksbo (cost=0.14..0.16 rows=1 width=426) (actual rows= loops=)

  • Index Cond: (salebranchorgid = kccc.salebranchorgid)
61. 0.000 0.000 ↓ 0.0

Index Scan using ix_pl_orgstruct_orgstructid on pl_orgstruct ps (cost=0.28..0.44 rows=1 width=177) (actual rows= loops=)

  • Index Cond: (orgstructid = "*SELECT* 1".saleareaid)
62. 0.000 0.000 ↓ 0.0

Index Scan using index_region_regionid on pl_region pr (cost=0.28..0.33 rows=1 width=26) (actual rows= loops=)

  • Index Cond: (regionid = "*SELECT* 1".regionid)
63. 0.000 0.000 ↓ 0.0

Index Scan using index_region_regionid on pl_region pr2 (cost=0.28..0.36 rows=1 width=18) (actual rows= loops=)

  • Index Cond: (regionid = pr.parentregionid)
64. 0.000 0.000 ↓ 0.0

Index Scan using pk_kx_cost_batch_1 on kx_cost_batch tt (cost=0.29..583.74 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (id > kb.id)
  • Filter: ((platstatus = 1) AND (costid = kb.costid))