explain.depesz.com

PostgreSQL's explain analyze made readable

Result: UL7C

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

GroupAggregate (cost=407,905.79..407,932.57 rows=1,275 width=435) (actual rows= loops=)

  • Group Key: a.install_date, t.event_name, a.agg_name, a.campaign_id, a.publisher_id, a.platform, a.medias_id, a.country
2.          

CTE costs

3. 0.000 0.000 ↓ 0.0

Append (cost=2,683.74..182,017.05 rows=188,894 width=72) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on install_rollup_daily a_1 (cost=2,683.74..158,125.98 rows=154,704 width=72) (actual rows= loops=)

  • Recheck Cond: (agg_name = 'campaign_publisher_platform'::text)
  • Filter: (date >= '2019-07-04'::date)
5. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on install_rollup_daily_agg_name (cost=0.00..2,676.01 rows=161,262 width=0) (actual rows= loops=)

  • Index Cond: (agg_name = 'campaign_publisher_platform'::text)
6. 0.000 0.000 ↓ 0.0

Index Scan using install_rollup_daily_p2019_09_15_agg_name_idx on install_rollup_daily_p2019_09_15 a_2 (cost=0.08..1,655.19 rows=2,138 width=72) (actual rows= loops=)

  • Index Cond: (agg_name = 'campaign_publisher_platform'::text)
  • Filter: (date >= '2019-07-04'::date)
7. 0.000 0.000 ↓ 0.0

Index Scan using install_rollup_daily_p2019_09_16_agg_name_idx on install_rollup_daily_p2019_09_16 a_3 (cost=0.08..1,648.84 rows=1,744 width=71) (actual rows= loops=)

  • Index Cond: (agg_name = 'campaign_publisher_platform'::text)
  • Filter: (date >= '2019-07-04'::date)
8. 0.000 0.000 ↓ 0.0

Index Scan using install_rollup_daily_p2019_09_17_agg_name_idx on install_rollup_daily_p2019_09_17 a_4 (cost=0.08..375.10 rows=2,004 width=72) (actual rows= loops=)

  • Index Cond: (agg_name = 'campaign_publisher_platform'::text)
  • Filter: (date >= '2019-07-04'::date)
9. 0.000 0.000 ↓ 0.0

Index Scan using install_rollup_daily_p2019_09_18_agg_name_idx on install_rollup_daily_p2019_09_18 a_5 (cost=0.08..493.50 rows=2,023 width=72) (actual rows= loops=)

  • Index Cond: (agg_name = 'campaign_publisher_platform'::text)
  • Filter: (date >= '2019-07-04'::date)
10. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on install_rollup_daily_p2019_09_19 a_6 (cost=79.45..1,831.01 rows=2,173 width=72) (actual rows= loops=)

  • Recheck Cond: (agg_name = 'campaign_publisher_platform'::text)
  • Filter: (date >= '2019-07-04'::date)
11. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on install_rollup_daily_p2019_09_19_agg_name_idx (cost=0.00..79.34 rows=2,173 width=0) (actual rows= loops=)

  • Index Cond: (agg_name = 'campaign_publisher_platform'::text)
12. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on install_rollup_daily_p2019_09_20 a_7 (cost=69.06..1,665.78 rows=1,920 width=71) (actual rows= loops=)

  • Recheck Cond: (agg_name = 'campaign_publisher_platform'::text)
  • Filter: (date >= '2019-07-04'::date)
13. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on install_rollup_daily_p2019_09_20_agg_name_idx (cost=0.00..68.96 rows=1,920 width=0) (actual rows= loops=)

  • Index Cond: (agg_name = 'campaign_publisher_platform'::text)
14. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on install_rollup_daily_p2019_09_21 a_8 (cost=77.43..1,916.76 rows=2,156 width=71) (actual rows= loops=)

  • Recheck Cond: (agg_name = 'campaign_publisher_platform'::text)
  • Filter: (date >= '2019-07-04'::date)
15. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on install_rollup_daily_p2019_09_21_agg_name_idx (cost=0.00..77.32 rows=2,156 width=0) (actual rows= loops=)

  • Index Cond: (agg_name = 'campaign_publisher_platform'::text)
16. 0.000 0.000 ↓ 0.0

Index Scan using install_rollup_daily_p2019_09_22_agg_name_idx on install_rollup_daily_p2019_09_22 a_9 (cost=0.08..1,735.61 rows=1,924 width=72) (actual rows= loops=)

  • Index Cond: (agg_name = 'campaign_publisher_platform'::text)
  • Filter: (date >= '2019-07-04'::date)
17. 0.000 0.000 ↓ 0.0

Index Scan using install_rollup_daily_p2019_09_23_agg_name_idx on install_rollup_daily_p2019_09_23 a_10 (cost=0.08..428.75 rows=1,998 width=71) (actual rows= loops=)

  • Index Cond: (agg_name = 'campaign_publisher_platform'::text)
  • Filter: (date >= '2019-07-04'::date)
18. 0.000 0.000 ↓ 0.0

Index Scan using install_rollup_daily_p2019_09_24_agg_name_idx on install_rollup_daily_p2019_09_24 a_11 (cost=0.08..693.90 rows=1,813 width=71) (actual rows= loops=)

  • Index Cond: (agg_name = 'campaign_publisher_platform'::text)
  • Filter: (date >= '2019-07-04'::date)
19. 0.000 0.000 ↓ 0.0

Index Scan using install_rollup_daily_p2019_09_25_agg_name_idx on install_rollup_daily_p2019_09_25 a_12 (cost=0.08..581.16 rows=1,784 width=71) (actual rows= loops=)

  • Index Cond: (agg_name = 'campaign_publisher_platform'::text)
  • Filter: (date >= '2019-07-04'::date)
20. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on install_rollup_daily_p2019_09_26 a_13 (cost=28.79..1,498.96 rows=1,749 width=72) (actual rows= loops=)

  • Recheck Cond: (agg_name = 'campaign_publisher_platform'::text)
  • Filter: (date >= '2019-07-04'::date)
21. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on install_rollup_daily_p2019_09_26_agg_name_idx (cost=0.00..28.71 rows=1,749 width=0) (actual rows= loops=)

  • Index Cond: (agg_name = 'campaign_publisher_platform'::text)
22. 0.000 0.000 ↓ 0.0

Index Scan using install_rollup_daily_p2019_09_27_agg_name_idx on install_rollup_daily_p2019_09_27 a_14 (cost=0.08..1,238.23 rows=1,766 width=72) (actual rows= loops=)

  • Index Cond: (agg_name = 'campaign_publisher_platform'::text)
  • Filter: (date >= '2019-07-04'::date)
23. 0.000 0.000 ↓ 0.0

Index Scan using install_rollup_daily_p2019_09_28_agg_name_idx on install_rollup_daily_p2019_09_28 a_15 (cost=0.08..1,784.38 rows=1,969 width=72) (actual rows= loops=)

  • Index Cond: (agg_name = 'campaign_publisher_platform'::text)
  • Filter: (date >= '2019-07-04'::date)
24. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on install_rollup_daily_p2019_09_29 a_16 (cost=33.06..1,772.35 rows=1,923 width=73) (actual rows= loops=)

  • Recheck Cond: (agg_name = 'campaign_publisher_platform'::text)
  • Filter: (date >= '2019-07-04'::date)
25. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on install_rollup_daily_p2019_09_29_agg_name_idx (cost=0.00..32.97 rows=1,923 width=0) (actual rows= loops=)

  • Index Cond: (agg_name = 'campaign_publisher_platform'::text)
26. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on install_rollup_daily_p2019_09_30 a_17 (cost=28.67..1,495.87 rows=1,666 width=72) (actual rows= loops=)

  • Recheck Cond: (agg_name = 'campaign_publisher_platform'::text)
  • Filter: (date >= '2019-07-04'::date)
27. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on install_rollup_daily_p2019_09_30_agg_name_idx (cost=0.00..28.58 rows=1,666 width=0) (actual rows= loops=)

  • Index Cond: (agg_name = 'campaign_publisher_platform'::text)
28. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on install_rollup_daily_p2019_10_01 a_18 (cost=48.75..1,523.92 rows=1,721 width=72) (actual rows= loops=)

  • Recheck Cond: (agg_name = 'campaign_publisher_platform'::text)
  • Filter: (date >= '2019-07-04'::date)
29. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on install_rollup_daily_p2019_10_01_agg_name_idx (cost=0.00..48.66 rows=1,721 width=0) (actual rows= loops=)

  • Index Cond: (agg_name = 'campaign_publisher_platform'::text)
30. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on install_rollup_daily_p2019_10_02 a_19 (cost=28.74..1,534.80 rows=1,715 width=71) (actual rows= loops=)

  • Recheck Cond: (agg_name = 'campaign_publisher_platform'::text)
  • Filter: (date >= '2019-07-04'::date)
31. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on install_rollup_daily_p2019_10_02_agg_name_idx (cost=0.00..28.66 rows=1,715 width=0) (actual rows= loops=)

  • Index Cond: (agg_name = 'campaign_publisher_platform'::text)
32. 0.000 0.000 ↓ 0.0

Index Scan using install_rollup_daily_p2019_10_date_agg_name_campaign_id_pu_key2 on install_rollup_daily_p2019_10_03 a_20 (cost=0.03..4.24 rows=1 width=132) (actual rows= loops=)

  • Index Cond: ((date >= '2019-07-04'::date) AND (agg_name = 'campaign_publisher_platform'::text))
33. 0.000 0.000 ↓ 0.0

Index Scan using install_rollup_daily_p2019_10_date_agg_name_campaign_id_pu_key3 on install_rollup_daily_p2019_10_04 a_21 (cost=0.03..4.24 rows=1 width=132) (actual rows= loops=)

  • Index Cond: ((date >= '2019-07-04'::date) AND (agg_name = 'campaign_publisher_platform'::text))
34. 0.000 0.000 ↓ 0.0

Index Scan using install_rollup_daily_p2019_10_date_agg_name_campaign_id_pu_key4 on install_rollup_daily_p2019_10_05 a_22 (cost=0.03..4.24 rows=1 width=132) (actual rows= loops=)

  • Index Cond: ((date >= '2019-07-04'::date) AND (agg_name = 'campaign_publisher_platform'::text))
35. 0.000 0.000 ↓ 0.0

Index Scan using install_rollup_daily_p2019_10_date_agg_name_campaign_id_pu_key5 on install_rollup_daily_p2019_10_06 a_23 (cost=0.03..4.24 rows=1 width=132) (actual rows= loops=)

  • Index Cond: ((date >= '2019-07-04'::date) AND (agg_name = 'campaign_publisher_platform'::text))
36.          

CTE downstream

37. 0.000 0.000 ↓ 0.0

Seq Scan on downstream_rollup_daily a_24 (cost=0.00..204,044.08 rows=599,474 width=90) (actual rows= loops=)

  • Filter: ((date >= '2019-07-04'::date) AND (agg_name = 'campaign_publisher_platform'::text))
38. 0.000 0.000 ↓ 0.0

Sort (cost=21,844.66..21,845.30 rows=1,275 width=167) (actual rows= loops=)

  • Sort Key: a.install_date, t.event_name, a.agg_name, a.campaign_id, a.publisher_id, a.platform, a.medias_id, a.country
39. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=20,557.47..21,831.51 rows=1,275 width=167) (actual rows= loops=)

  • Merge Cond: ((a.campaign_id = b.campaign_id) AND (a.platform = b.platform))
  • Join Filter: ((b.downstream_date >= a.install_date) AND (a.install_date = b.install_date) AND (a.publisher_id = b.publisher_id))
40. 0.000 0.000 ↓ 0.0

Merge Join (cost=5,454.71..5,742.29 rows=1,275 width=147) (actual rows= loops=)

  • Merge Cond: ((t.campaign_id = a.campaign_id) AND (t.platform = a.platform))
41. 0.000 0.000 ↓ 0.0

Sort (cost=1,010.56..1,010.70 rows=270 width=28) (actual rows= loops=)

  • Sort Key: t.campaign_id, t.platform
42. 0.000 0.000 ↓ 0.0

Index Scan using tracking_tokens_campaign_id on tracking_tokens t (cost=0.05..1,008.38 rows=270 width=28) (actual rows= loops=)

43. 0.000 0.000 ↓ 0.0

Sort (cost=4,444.15..4,538.60 rows=188,894 width=132) (actual rows= loops=)

  • Sort Key: a.campaign_id, a.platform
44. 0.000 0.000 ↓ 0.0

CTE Scan on costs a (cost=0.00..1,133.36 rows=188,894 width=132) (actual rows= loops=)

45. 0.000 0.000 ↓ 0.0

Sort (cost=15,102.75..15,402.49 rows=599,474 width=72) (actual rows= loops=)

  • Sort Key: b.campaign_id, b.platform
46. 0.000 0.000 ↓ 0.0

CTE Scan on downstream b (cost=0.00..3,596.84 rows=599,474 width=72) (actual rows= loops=)