explain.depesz.com

PostgreSQL's explain analyze made readable

Result: waCm

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

CTE Scan on suggs_at_geo (cost=87.60..87.72 rows=1 width=708) (actual rows= loops=)

2.          

CTE filtered_leaf_geos

3. 0.000 0.000 ↓ 0.0

Unique (cost=55.64..55.65 rows=1 width=144) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Sort (cost=55.64..55.65 rows=1 width=144) (actual rows= loops=)

  • Sort Key: geo_closure_leaf.descendant, leaf_info.parent_id, parent_info.name
5. 0.000 0.000 ↓ 0.0

Hash Join (cost=42.77..55.63 rows=1 width=144) (actual rows= loops=)

  • Hash Cond: ((geo_closure_leaf.descendant)::text = (leaf_info.id)::text)
6. 0.000 0.000 ↓ 0.0

Seq Scan on geo_closure_leaf (cost=1.53..13.93 rows=120 width=118) (actual rows= loops=)

  • Filter: ((hashed SubPlan 1) OR (hashed SubPlan 2))
7.          

SubPlan (forSeq Scan)

8. 0.000 0.000 ↓ 0.0

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=0) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=0) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Hash (cost=41.20..41.20 rows=3 width=35) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Hash Join (cost=11.88..41.20 rows=3 width=35) (actual rows= loops=)

  • Hash Cond: ((leaf_info.parent_id)::text = (parent_info.id)::text)
14. 0.000 0.000 ↓ 0.0

Seq Scan on geography_closure_vw_t leaf_info (cost=0.00..25.28 rows=1,528 width=18) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Hash (cost=11.86..11.86 rows=1 width=26) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Seq Scan on geography_hierarchy parent_info (cost=0.00..11.86 rows=1 width=26) (actual rows= loops=)

  • Filter: ((geography_level_id)::text = ''::text)
17.          

CTE curr

18. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=15.90..15.94 rows=1 width=580) (actual rows= loops=)

  • Group Key: filtered_leaf_geos.parent_id, filtered_leaf_geos.name
19. 0.000 0.000 ↓ 0.0

Sort (cost=15.90..15.91 rows=1 width=682) (actual rows= loops=)

  • Sort Key: filtered_leaf_geos.parent_id, filtered_leaf_geos.name
20. 0.000 0.000 ↓ 0.0

Nested Loop (cost=7.81..15.89 rows=1 width=682) (actual rows= loops=)

  • Join Filter: ((filtered_leaf_geos.leaf_geo_id)::text = (rep_feedback_summary.geo_id)::text)
21. 0.000 0.000 ↓ 0.0

CTE Scan on filtered_leaf_geos (cost=0.00..0.02 rows=1 width=666) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Index Scan using ix_rep_feedback_summary on rep_feedback_summary (cost=7.81..15.86 rows=1 width=352) (actual rows= loops=)

  • Index Cond: ((business_unit_sk)::text = ''::text)
  • Filter: ((sugg_posted_month_recency >= 1) AND (sugg_posted_month_recency <= 3) AND ((hashed SubPlan 4) OR (hashed SubPlan 5)) AND ((hashed SubPlan 6) OR (hashed SubPlan 7)) AND ((hashed SubPlan 8) OR (hashed SubPlan 9)) AND ((hashed SubPlan 10) OR (hashed SubPlan 11)) AND ((hashed SubPlan 12) OR (hashed SubPlan 13)))
23.          

SubPlan (forIndex Scan)

24. 0.000 0.000 ↓ 0.0

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual rows= loops=)

25. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=0) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=0) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual rows= loops=)

29. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=0) (actual rows= loops=)

30. 0.000 0.000 ↓ 0.0

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual rows= loops=)

31. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=0) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=0) (actual rows= loops=)

34. 0.000 0.000 ↓ 0.0

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=0) (actual rows= loops=)

36. 0.000 0.000 ↓ 0.0

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual rows= loops=)

37. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=0) (actual rows= loops=)

38. 0.000 0.000 ↓ 0.0

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual rows= loops=)

39. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=0) (actual rows= loops=)

40. 0.000 0.000 ↓ 0.0

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual rows= loops=)

41. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=0) (actual rows= loops=)

42. 0.000 0.000 ↓ 0.0

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual rows= loops=)

43. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=0) (actual rows= loops=)

44.          

CTE prev

45. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=15.90..15.94 rows=1 width=64) (actual rows= loops=)

  • Group Key: b.parent_id
46. 0.000 0.000 ↓ 0.0

Sort (cost=15.90..15.91 rows=1 width=166) (actual rows= loops=)

  • Sort Key: b.parent_id
47. 0.000 0.000 ↓ 0.0

Nested Loop (cost=7.81..15.89 rows=1 width=166) (actual rows= loops=)

  • Join Filter: ((b.leaf_geo_id)::text = (a.geo_id)::text)
48. 0.000 0.000 ↓ 0.0

CTE Scan on filtered_leaf_geos b (cost=0.00..0.02 rows=1 width=150) (actual rows= loops=)

49. 0.000 0.000 ↓ 0.0

Index Scan using ix_rep_feedback_summary on rep_feedback_summary a (cost=7.81..15.86 rows=1 width=352) (actual rows= loops=)

  • Index Cond: ((business_unit_sk)::text = ''::text)
  • Filter: ((sugg_posted_month_recency >= 4) AND (sugg_posted_month_recency <= 6) AND ((hashed SubPlan 15) OR (hashed SubPlan 16)) AND ((hashed SubPlan 17) OR (hashed SubPlan 18)) AND ((hashed SubPlan 19) OR (hashed SubPlan 20)) AND ((hashed SubPlan 21) OR (hashed SubPlan 22)) AND ((hashed SubPlan 23) OR (hashed SubPlan 24)))
50.          

SubPlan (forIndex Scan)

51. 0.000 0.000 ↓ 0.0

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual rows= loops=)

52. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=0) (actual rows= loops=)

53. 0.000 0.000 ↓ 0.0

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual rows= loops=)

54. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=0) (actual rows= loops=)

55. 0.000 0.000 ↓ 0.0

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual rows= loops=)

56. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=0) (actual rows= loops=)

57. 0.000 0.000 ↓ 0.0

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual rows= loops=)

58. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=0) (actual rows= loops=)

59. 0.000 0.000 ↓ 0.0

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual rows= loops=)

60. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=0) (actual rows= loops=)

61. 0.000 0.000 ↓ 0.0

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual rows= loops=)

62. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=0) (actual rows= loops=)

63. 0.000 0.000 ↓ 0.0

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual rows= loops=)

64. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=0) (actual rows= loops=)

65. 0.000 0.000 ↓ 0.0

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual rows= loops=)

66. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=0) (actual rows= loops=)

67. 0.000 0.000 ↓ 0.0

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual rows= loops=)

68. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=0) (actual rows= loops=)

69. 0.000 0.000 ↓ 0.0

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual rows= loops=)

70. 0.000 0.000 ↓ 0.0

Result (cost=0.00..0.01 rows=1 width=0) (actual rows= loops=)

71.          

CTE suggs_at_geo

72. 0.000 0.000 ↓ 0.0

Hash Full Join (cost=0.03..0.07 rows=1 width=612) (actual rows= loops=)

  • Hash Cond: ((curr.parent_id)::text = (prev.parent_id)::text)
73. 0.000 0.000 ↓ 0.0

CTE Scan on curr (cost=0.00..0.02 rows=1 width=580) (actual rows= loops=)

74. 0.000 0.000 ↓ 0.0

Hash (cost=0.02..0.02 rows=1 width=64) (actual rows= loops=)

75. 0.000 0.000 ↓ 0.0

CTE Scan on prev (cost=0.00..0.02 rows=1 width=64) (actual rows= loops=)