explain.depesz.com

PostgreSQL's explain analyze made readable

Result: GRHF

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

XN Merge (cost=1,000,696,124,880.20..1,000,696,124,880.20 rows=1 width=100) (actual rows= loops=)

  • Merge Key: date(date_trunc('day'::text, (d.report_date)::timestamp without time zone))
2. 0.000 0.000 ↓ 0.0

XN Network (cost=1,000,696,124,880.20..1,000,696,124,880.20 rows=1 width=100) (actual rows= loops=)

  • Send to leader
3. 0.000 0.000 ↓ 0.0

XN Sort (cost=1,000,696,124,880.20..1,000,696,124,880.20 rows=1 width=100) (actual rows= loops=)

  • Sort Key: date(date_trunc('day'::text, (d.report_date)::timestamp without time zone))
4. 0.000 0.000 ↓ 0.0

XN HashAggregate (cost=696,124,880.06..696,124,880.19 rows=1 width=100) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

XN Hash Join DS_BCAST_INNER (cost=1,201,309.08..696,124,880.01 rows=1 width=100) (actual rows= loops=)

  • Hash Cond: (((CASE WHEN ("outer".keyword_text IS NOT NULL) THEN "outer".keyword_text ELSE "outer".keyword_text END)::text = ("inner".keyword_text)::text) AND ((CASE WHEN ("outer".match_type IS NOT NULL) THEN "outer".match_type ELSE "outer".match_type END)::text = ("inner".match_type)::text))
6. 0.000 0.000 ↓ 0.0

XN Hash Full Join DS_DIST_BOTH (cost=737,834.56..689,061,322.82 rows=3,306 width=128) (actual rows= loops=)

  • Outer Dist Key: y.keyword_text
  • Inner Dist Key: x.keyword_text
  • Hash Cond: ((("outer".keyword_text)::text = ("inner".keyword_text)::text) AND (("outer".match_type)::text = ("inner".match_type)::text))
7. 0.000 0.000 ↓ 0.0

XN Subquery Scan y (cost=637,631.98..637,665.04 rows=3,306 width=64) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

XN HashAggregate (cost=637,631.98..637,631.98 rows=3,306 width=64) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

XN Subquery Scan g (cost=320,468.44..637,466.70 rows=33,057 width=64) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

XN Append (cost=320,468.44..637,136.13 rows=33,057 width=31) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

XN Subquery Scan "*SELECT* 1" (cost=320,468.44..320,468.45 rows=1 width=31) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

XN HashAggregate (cost=320,468.44..320,468.44 rows=1 width=31) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

XN Hash Join DS_DIST_ALL_NONE (cost=201.14..320,468.44 rows=1 width=31) (actual rows= loops=)

  • Hash Cond: (("outer".campaign_id = "inner".campaign_id) AND ("outer".profile_id = "inner".profile_id))
14. 0.000 0.000 ↓ 0.0

XN Hash Join DS_DIST_NONE (cost=199.64..320,466.91 rows=1 width=63) (actual rows= loops=)

  • Hash Cond: (("outer".entity_id = "inner".keyword_id) AND ("outer".profile_id = "inner".profile_id))
15. 0.000 0.000 ↓ 0.0

XN Seq Scan on tbl_amzn_keyword_report a (cost=0.00..312,003.31 rows=330,558 width=16) (actual rows= loops=)

  • Filter: ((profile_id = 2,820,840,363,509,352::bigint) AND (report_date >= '2020-08-01'::date) AND (report_date <= '2020-08-31'::date))
16. 0.000 0.000 ↓ 0.0

XN Hash (cost=199.63..199.63 rows=2 width=63) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

XN Hash Join DS_DIST_ALL_NONE (cost=3.04..199.63 rows=2 width=63) (actual rows= loops=)

  • Hash Cond: (("outer".adgroup_id = "inner".adgroup_id) AND ("outer".profile_id = "inner".profile_id))
18. 0.000 0.000 ↓ 0.0

XN Seq Scan on tbl_amzn_keyword x (cost=0.00..74.07 rows=4,900 width=63) (actual rows= loops=)

  • Filter: ((profile_id = 2,820,840,363,509,352::bigint) AND ((keyword_text)::text <> '(_targeting_auto_)'::text))
19. 0.000 0.000 ↓ 0.0

XN Hash (cost=2.17..2.17 rows=174 width=16) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

XN Seq Scan on tbl_amzn_adgroup adgroup (cost=0.00..2.17 rows=174 width=16) (actual rows= loops=)

  • Filter: (profile_id = 2,820,840,363,509,352::bigint)
21. 0.000 0.000 ↓ 0.0

XN Hash (cost=1.06..1.06 rows=86 width=16) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

XN Seq Scan on tbl_amzn_campaign camp1 (cost=0.00..1.06 rows=86 width=16) (actual rows= loops=)

  • Filter: (profile_id = 2,820,840,363,509,352::bigint)
23. 0.000 0.000 ↓ 0.0

XN Subquery Scan "*SELECT* 2" (cost=201.82..316,667.67 rows=33,056 width=31) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

XN Hash Right Join DS_DIST_NONE (cost=201.82..316,337.11 rows=33,056 width=31) (actual rows= loops=)

  • Hash Cond: ("outer".entity_id = "inner".keyword_id)
  • Filter: ("outer".entity_id IS NULL)
25. 0.000 0.000 ↓ 0.0

XN Seq Scan on tbl_amzn_keyword_report rep (cost=0.00..312,003.31 rows=330,558 width=8) (actual rows= loops=)

  • Filter: ((profile_id = 2,820,840,363,509,352::bigint) AND (report_date >= '2020-08-01'::date) AND (report_date <= '2020-08-31'::date))
26. 0.000 0.000 ↓ 0.0

XN Hash (cost=201.82..201.82 rows=1 width=39) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

XN Hash Join DS_DIST_ALL_NONE (cost=5.17..201.82 rows=1 width=39) (actual rows= loops=)

  • Hash Cond: (("outer".campaign_id = "inner".campaign_id) AND ("outer".profile_id = "inner".profile_id))
28. 0.000 0.000 ↓ 0.0

XN Hash Join DS_DIST_ALL_NONE (cost=3.47..200.06 rows=2 width=63) (actual rows= loops=)

  • Hash Cond: (("outer".adgroup_id = "inner".adgroup_id) AND ("outer".profile_id = "inner".profile_id))
29. 0.000 0.000 ↓ 0.0

XN Seq Scan on tbl_amzn_keyword "key" (cost=0.00..74.07 rows=4,900 width=63) (actual rows= loops=)

  • Filter: ((profile_id = 2,820,840,363,509,352::bigint) AND ((keyword_text)::text <> '(_targeting_auto_)'::text))
30. 0.000 0.000 ↓ 0.0

XN Hash (cost=2.61..2.61 rows=172 width=16) (actual rows= loops=)

31. 0.000 0.000 ↓ 0.0

XN Seq Scan on tbl_amzn_adgroup adgroup (cost=0.00..2.61 rows=172 width=16) (actual rows= loops=)

  • Filter: ((profile_id = 2,820,840,363,509,352::bigint) AND ((serving_status)::text <> 'ENDED'::text))
32. 0.000 0.000 ↓ 0.0

XN Hash (cost=1.28..1.28 rows=85 width=16) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

XN Seq Scan on tbl_amzn_campaign camp1 (cost=0.00..1.28 rows=85 width=16) (actual rows= loops=)

  • Filter: ((profile_id = 2,820,840,363,509,352::bigint) AND ((serving_status)::text <> 'ENDED'::text))
34. 0.000 0.000 ↓ 0.0

XN Hash (cost=100,199.99..100,199.99 rows=518 width=64) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

XN Subquery Scan x (cost=100,194.81..100,199.99 rows=518 width=64) (actual rows= loops=)

36. 0.000 0.000 ↓ 0.0

XN HashAggregate (cost=100,194.81..100,194.81 rows=518 width=64) (actual rows= loops=)

37. 0.000 0.000 ↓ 0.0

XN Subquery Scan e (cost=50,355.90..100,168.92 rows=5,178 width=64) (actual rows= loops=)

38. 0.000 0.000 ↓ 0.0

XN Append (cost=50,355.90..100,117.14 rows=5,178 width=31) (actual rows= loops=)

39. 0.000 0.000 ↓ 0.0

XN Subquery Scan "*SELECT* 1" (cost=50,355.90..50,355.91 rows=1 width=31) (actual rows= loops=)

40. 0.000 0.000 ↓ 0.0

XN HashAggregate (cost=50,355.90..50,355.90 rows=1 width=31) (actual rows= loops=)

41. 0.000 0.000 ↓ 0.0

XN Hash Join DS_DIST_ALL_NONE (cost=201.14..50,355.90 rows=1 width=31) (actual rows= loops=)

  • Hash Cond: (("outer".campaign_id = "inner".campaign_id) AND ("outer".profile_id = "inner".profile_id))
42. 0.000 0.000 ↓ 0.0

XN Hash Join DS_DIST_NONE (cost=199.64..50,354.37 rows=1 width=63) (actual rows= loops=)

  • Hash Cond: (("outer".entity_id = "inner".keyword_id) AND ("outer".profile_id = "inner".profile_id))
43. 0.000 0.000 ↓ 0.0

XN Seq Scan on tbl_amzn_keyword_report a (cost=0.00..48,860.54 rows=51,767 width=16) (actual rows= loops=)

  • Filter: ((profile_id = 2,820,840,363,509,352::bigint) AND (report_date >= '2020-09-01'::date) AND (report_date <= '2020-09-30'::date))
44. 0.000 0.000 ↓ 0.0

XN Hash (cost=199.63..199.63 rows=2 width=63) (actual rows= loops=)

45. 0.000 0.000 ↓ 0.0

XN Hash Join DS_DIST_ALL_NONE (cost=3.04..199.63 rows=2 width=63) (actual rows= loops=)

  • Hash Cond: (("outer".adgroup_id = "inner".adgroup_id) AND ("outer".profile_id = "inner".profile_id))
46. 0.000 0.000 ↓ 0.0

XN Seq Scan on tbl_amzn_keyword x (cost=0.00..74.07 rows=4,900 width=63) (actual rows= loops=)

  • Filter: ((profile_id = 2,820,840,363,509,352::bigint) AND ((keyword_text)::text <> '(_targeting_auto_)'::text))
47. 0.000 0.000 ↓ 0.0

XN Hash (cost=2.17..2.17 rows=174 width=16) (actual rows= loops=)

48. 0.000 0.000 ↓ 0.0

XN Seq Scan on tbl_amzn_adgroup adgroup (cost=0.00..2.17 rows=174 width=16) (actual rows= loops=)

  • Filter: (profile_id = 2,820,840,363,509,352::bigint)
49. 0.000 0.000 ↓ 0.0

XN Hash (cost=1.06..1.06 rows=86 width=16) (actual rows= loops=)

50. 0.000 0.000 ↓ 0.0

XN Seq Scan on tbl_amzn_campaign camp1 (cost=0.00..1.06 rows=86 width=16) (actual rows= loops=)

  • Filter: (profile_id = 2,820,840,363,509,352::bigint)
51. 0.000 0.000 ↓ 0.0

XN Subquery Scan "*SELECT* 2" (cost=201.82..49,761.23 rows=5,177 width=31) (actual rows= loops=)

52. 0.000 0.000 ↓ 0.0

XN Hash Right Join DS_DIST_NONE (cost=201.82..49,709.46 rows=5,177 width=31) (actual rows= loops=)

  • Hash Cond: ("outer".entity_id = "inner".keyword_id)
  • Filter: ("outer".entity_id IS NULL)
53. 0.000 0.000 ↓ 0.0

XN Seq Scan on tbl_amzn_keyword_report rep (cost=0.00..48,860.54 rows=51,767 width=8) (actual rows= loops=)

  • Filter: ((profile_id = 2,820,840,363,509,352::bigint) AND (report_date >= '2020-09-01'::date) AND (report_date <= '2020-09-30'::date))
54. 0.000 0.000 ↓ 0.0

XN Hash (cost=201.82..201.82 rows=1 width=39) (actual rows= loops=)

55. 0.000 0.000 ↓ 0.0

XN Hash Join DS_DIST_ALL_NONE (cost=5.17..201.82 rows=1 width=39) (actual rows= loops=)

  • Hash Cond: (("outer".campaign_id = "inner".campaign_id) AND ("outer".profile_id = "inner".profile_id))
56. 0.000 0.000 ↓ 0.0

XN Hash Join DS_DIST_ALL_NONE (cost=3.47..200.06 rows=2 width=63) (actual rows= loops=)

  • Hash Cond: (("outer".adgroup_id = "inner".adgroup_id) AND ("outer".profile_id = "inner".profile_id))
57. 0.000 0.000 ↓ 0.0

XN Seq Scan on tbl_amzn_keyword "key" (cost=0.00..74.07 rows=4,900 width=63) (actual rows= loops=)

  • Filter: ((profile_id = 2,820,840,363,509,352::bigint) AND ((keyword_text)::text <> '(_targeting_auto_)'::text))
58. 0.000 0.000 ↓ 0.0

XN Hash (cost=2.61..2.61 rows=172 width=16) (actual rows= loops=)

59. 0.000 0.000 ↓ 0.0

XN Seq Scan on tbl_amzn_adgroup adgroup (cost=0.00..2.61 rows=172 width=16) (actual rows= loops=)

  • Filter: ((profile_id = 2,820,840,363,509,352::bigint) AND ((serving_status)::text <> 'ENDED'::text))
60. 0.000 0.000 ↓ 0.0

XN Hash (cost=1.28..1.28 rows=85 width=16) (actual rows= loops=)

61. 0.000 0.000 ↓ 0.0

XN Seq Scan on tbl_amzn_campaign camp1 (cost=0.00..1.28 rows=85 width=16) (actual rows= loops=)

  • Filter: ((profile_id = 2,820,840,363,509,352::bigint) AND ((serving_status)::text <> 'ENDED'::text))
62. 0.000 0.000 ↓ 0.0

XN Hash (cost=463,474.51..463,474.51 rows=1 width=649) (actual rows= loops=)

63. 0.000 0.000 ↓ 0.0

XN Subquery Scan d (cost=463,474.49..463,474.51 rows=1 width=649) (actual rows= loops=)

64. 0.000 0.000 ↓ 0.0

XN HashAggregate (cost=463,474.49..463,474.50 rows=1 width=71) (actual rows= loops=)

65. 0.000 0.000 ↓ 0.0

XN Hash Join DS_DIST_ALL_NONE (cost=201.14..463,474.47 rows=1 width=71) (actual rows= loops=)

  • Hash Cond: (("outer".campaign_id = "inner".campaign_id) AND ("outer".profile_id = "inner".profile_id))
66. 0.000 0.000 ↓ 0.0

XN Hash Join DS_DIST_NONE (cost=199.64..463,472.94 rows=1 width=103) (actual rows= loops=)

  • Hash Cond: (("outer".entity_id = "inner".keyword_id) AND ("outer".profile_id = "inner".profile_id))
67. 0.000 0.000 ↓ 0.0

XN Seq Scan on tbl_amzn_keyword_report a (cost=0.00..453,922.13 rows=374,046 width=56) (actual rows= loops=)

  • Filter: ((profile_id = 2,820,840,363,509,352::bigint) AND (((report_date >= '2020-08-01'::date) AND (report_date <= '2020-08-31'::date)) OR ((report_date >= '2020-09-01'::date) AND (report_date <= '2020-09-30'::date))))
68. 0.000 0.000 ↓ 0.0

XN Hash (cost=199.63..199.63 rows=2 width=63) (actual rows= loops=)

69. 0.000 0.000 ↓ 0.0

XN Hash Join DS_DIST_ALL_NONE (cost=3.04..199.63 rows=2 width=63) (actual rows= loops=)

  • Hash Cond: (("outer".adgroup_id = "inner".adgroup_id) AND ("outer".profile_id = "inner".profile_id))
70. 0.000 0.000 ↓ 0.0

XN Seq Scan on tbl_amzn_keyword "key" (cost=0.00..74.07 rows=4,900 width=63) (actual rows= loops=)

  • Filter: ((profile_id = 2,820,840,363,509,352::bigint) AND ((keyword_text)::text <> '(_targeting_auto_)'::text))
71. 0.000 0.000 ↓ 0.0

XN Hash (cost=2.17..2.17 rows=174 width=16) (actual rows= loops=)

72. 0.000 0.000 ↓ 0.0

XN Seq Scan on tbl_amzn_adgroup adgroup (cost=0.00..2.17 rows=174 width=16) (actual rows= loops=)

  • Filter: (profile_id = 2,820,840,363,509,352::bigint)
73. 0.000 0.000 ↓ 0.0

XN Hash (cost=1.06..1.06 rows=86 width=16) (actual rows= loops=)

74. 0.000 0.000 ↓ 0.0

XN Seq Scan on tbl_amzn_campaign camp (cost=0.00..1.06 rows=86 width=16) (actual rows= loops=)

  • Filter: (profile_id = 2,820,840,363,509,352::bigint)