explain.depesz.com

PostgreSQL's explain analyze made readable

Result: QHvA

Settings
# exclusive inclusive rows x rows loops node
1. 1.263 1,665.708 ↑ 150.6 208 1

Sort (cost=336,744.78..336,823.08 rows=31,320 width=342) (actual time=1,665.643..1,665.708 rows=208 loops=1)

  • Output: (sum(adins.net_cost)), (sum(adins.target_impressions)), ((('1000'::double precision * sum(adins.net_cost)) / NULLIF(sum(adins.target_impressions), '0'::double precision))), mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, rollup.id, rollup.name, mdm_mediagrouplist.media_group_id, mdm_mediagroup.name, base_media_rfi.r1, opt_media_rfi.r1, a18_media_rfi.r1, media_base_pop.population, media_opt_pop.population, mdm_targetpopulation.population, base_target.rif_target_id, opt_target.rif_target_id, brand.name, adins.brand_id, adins.target_id, bto.target_id, bto.objective_id, flrf.cal_impact, adins.configuration_id
  • Sort Key: adins.configuration_id, adins.brand_id, rollup.name, mdm_media.short_name, bto.target_id, bto.objective_id
  • Sort Method: quicksort Memory: 118kB
2. 14.890 1,664.445 ↑ 150.6 208 1

GroupAggregate (cost=327,054.19..329,481.49 rows=31,320 width=342) (actual time=1,637.029..1,664.445 rows=208 loops=1)

  • Output: sum(adins.net_cost), sum(adins.target_impressions), (('1000'::double precision * sum(adins.net_cost)) / NULLIF(sum(adins.target_impressions), '0'::double precision)), mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, rollup.id, rollup.name, mdm_mediagrouplist.media_group_id, mdm_mediagroup.name, base_media_rfi.r1, opt_media_rfi.r1, a18_media_rfi.r1, media_base_pop.population, media_opt_pop.population, mdm_targetpopulation.population, base_target.rif_target_id, opt_target.rif_target_id, brand.name, adins.brand_id, adins.target_id, bto.target_id, bto.objective_id, flrf.cal_impact, adins.configuration_id
  • Group Key: mdm_media.id, rollup.id, adins.target_id, mdm_mediagrouplist.media_group_id, mdm_mediagroup.name, base_media_rfi.r1, opt_media_rfi.r1, a18_media_rfi.r1, mdm_targetpopulation.population, media_base_pop.population, media_opt_pop.population, base_target.rif_target_id, opt_target.rif_target_id, brand.name, adins.brand_id, adins.configuration_id, bto.target_id, bto.objective_id, flrf.cal_impact
3. 121.423 1,649.555 ↑ 1.7 18,008 1

Sort (cost=327,054.19..327,132.49 rows=31,320 width=334) (actual time=1,636.998..1,649.555 rows=18,008 loops=1)

  • Output: mdm_media.id, rollup.id, mdm_mediagrouplist.media_group_id, mdm_mediagroup.name, base_media_rfi.r1, opt_media_rfi.r1, a18_media_rfi.r1, media_base_pop.population, media_opt_pop.population, mdm_targetpopulation.population, base_target.rif_target_id, opt_target.rif_target_id, brand.name, adins.brand_id, adins.target_id, bto.target_id, bto.objective_id, flrf.cal_impact, adins.configuration_id, adins.net_cost, adins.target_impressions, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, rollup.name
  • Sort Key: mdm_media.id, rollup.id, adins.target_id, mdm_mediagrouplist.media_group_id, mdm_mediagroup.name, base_media_rfi.r1, opt_media_rfi.r1, a18_media_rfi.r1, mdm_targetpopulation.population, media_base_pop.population, media_opt_pop.population, base_target.rif_target_id, opt_target.rif_target_id, brand.name, adins.brand_id, adins.configuration_id, bto.target_id, bto.objective_id, flrf.cal_impact
  • Sort Method: external merge Disk: 4888kB
4. 18.438 1,528.132 ↑ 1.7 18,008 1

Merge Right Join (cost=319,065.08..319,895.90 rows=31,320 width=334) (actual time=1,481.672..1,528.132 rows=18,008 loops=1)

  • Output: mdm_media.id, rollup.id, mdm_mediagrouplist.media_group_id, mdm_mediagroup.name, base_media_rfi.r1, opt_media_rfi.r1, a18_media_rfi.r1, media_base_pop.population, media_opt_pop.population, mdm_targetpopulation.population, base_target.rif_target_id, opt_target.rif_target_id, brand.name, adins.brand_id, adins.target_id, bto.target_id, bto.objective_id, flrf.cal_impact, adins.configuration_id, adins.net_cost, adins.target_impressions, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, rollup.name
  • Merge Cond: ((media_base_pop.geography_id = mdm_media.geography_id) AND (media_base_pop.target_id = adins.target_id))
5. 22.497 33.670 ↑ 3.9 7,559 1

Sort (cost=2,723.86..2,797.11 rows=29,300 width=16) (actual time=30.957..33.670 rows=7,559 loops=1)

  • Output: media_base_pop.population, media_base_pop.target_id, media_base_pop.geography_id
  • Sort Key: media_base_pop.geography_id, media_base_pop.target_id
  • Sort Method: quicksort Memory: 2134kB
6. 11.173 11.173 ↑ 1.0 29,137 1

Seq Scan on public.mdm_targetpopulation media_base_pop (cost=0.00..550.00 rows=29,300 width=16) (actual time=0.006..11.173 rows=29,137 loops=1)

  • Output: media_base_pop.population, media_base_pop.target_id, media_base_pop.geography_id
7. 16.673 1,476.024 ↑ 1.4 18,008 1

Materialize (cost=316,341.22..316,471.53 rows=26,061 width=326) (actual time=1,450.704..1,476.024 rows=18,008 loops=1)

  • Output: adins.net_cost, adins.target_impressions, adins.brand_id, adins.target_id, adins.configuration_id, mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, bto.target_id, bto.objective_id, brand.name, rollup.id, rollup.name, mdm_mediagrouplist.media_group_id, mdm_mediagroup.name, base_target.rif_target_id, base_media_rfi.r1, opt_target.rif_target_id, opt_media_rfi.r1, a18_media_rfi.r1, mdm_targetpopulation.population, media_opt_pop.population, flrf.cal_impact
8. 34.359 1,459.351 ↑ 1.4 18,008 1

Sort (cost=316,341.22..316,406.37 rows=26,061 width=326) (actual time=1,450.700..1,459.351 rows=18,008 loops=1)

  • Output: adins.net_cost, adins.target_impressions, adins.brand_id, adins.target_id, adins.configuration_id, mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, bto.target_id, bto.objective_id, brand.name, rollup.id, rollup.name, mdm_mediagrouplist.media_group_id, mdm_mediagroup.name, base_target.rif_target_id, base_media_rfi.r1, opt_target.rif_target_id, opt_media_rfi.r1, a18_media_rfi.r1, mdm_targetpopulation.population, media_opt_pop.population, flrf.cal_impact
  • Sort Key: mdm_media.geography_id, adins.target_id
  • Sort Method: external merge Disk: 4712kB
9. 33.759 1,424.992 ↑ 1.4 18,008 1

Hash Right Join (cost=304,285.07..310,509.70 rows=26,061 width=326) (actual time=1,395.482..1,424.992 rows=18,008 loops=1)

  • Output: adins.net_cost, adins.target_impressions, adins.brand_id, adins.target_id, adins.configuration_id, mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, bto.target_id, bto.objective_id, brand.name, rollup.id, rollup.name, mdm_mediagrouplist.media_group_id, mdm_mediagroup.name, base_target.rif_target_id, base_media_rfi.r1, opt_target.rif_target_id, opt_media_rfi.r1, a18_media_rfi.r1, mdm_targetpopulation.population, media_opt_pop.population, flrf.cal_impact
  • Hash Cond: ((media_opt_pop.target_id = opt_target.id) AND (media_opt_pop.geography_id = mdm_media.geography_id))
10. 11.625 11.625 ↑ 1.0 29,137 1

Seq Scan on public.mdm_targetpopulation media_opt_pop (cost=0.00..550.00 rows=29,300 width=16) (actual time=0.012..11.625 rows=29,137 loops=1)

  • Output: media_opt_pop.population, media_opt_pop.target_id, media_opt_pop.geography_id
11. 16.569 1,379.608 ↑ 1.4 18,008 1

Hash (cost=302,774.15..302,774.15 rows=26,061 width=322) (actual time=1,379.608..1,379.608 rows=18,008 loops=1)

  • Output: adins.net_cost, adins.target_impressions, adins.brand_id, adins.target_id, adins.configuration_id, mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, bto.target_id, bto.objective_id, brand.name, rollup.id, rollup.name, mdm_mediagrouplist.media_group_id, mdm_mediagroup.name, base_target.rif_target_id, base_media_rfi.r1, opt_target.rif_target_id, opt_target.id, opt_media_rfi.r1, a18_media_rfi.r1, mdm_targetpopulation.population, flrf.cal_impact
  • Buckets: 16384 (originally 16384) Batches: 8 (originally 4) Memory Usage: 3969kB
12. 15.308 1,363.039 ↑ 1.4 18,008 1

Hash Right Join (cost=301,321.85..302,774.15 rows=26,061 width=322) (actual time=1,348.786..1,363.039 rows=18,008 loops=1)

  • Output: adins.net_cost, adins.target_impressions, adins.brand_id, adins.target_id, adins.configuration_id, mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, bto.target_id, bto.objective_id, brand.name, rollup.id, rollup.name, mdm_mediagrouplist.media_group_id, mdm_mediagroup.name, base_target.rif_target_id, base_media_rfi.r1, opt_target.rif_target_id, opt_target.id, opt_media_rfi.r1, a18_media_rfi.r1, mdm_targetpopulation.population, flrf.cal_impact
  • Hash Cond: (mdm_targetpopulation.target_id = opt_target.id)
13. 0.156 0.183 ↓ 1.0 183 1

Bitmap Heap Scan on public.mdm_targetpopulation (cost=5.65..252.05 rows=176 width=12) (actual time=0.040..0.183 rows=183 loops=1)

  • Output: mdm_targetpopulation.population, mdm_targetpopulation.target_id
  • Recheck Cond: (mdm_targetpopulation.geography_id = 1)
  • Heap Blocks: exact=71
14. 0.027 0.027 ↓ 1.0 183 1

Bitmap Index Scan on mdm_targetpopulation_bba4d9cf (cost=0.00..5.61 rows=176 width=0) (actual time=0.027..0.027 rows=183 loops=1)

  • Index Cond: (mdm_targetpopulation.geography_id = 1)
15. 16.231 1,347.548 ↑ 1.4 18,008 1

Hash (cost=299,895.44..299,895.44 rows=26,061 width=314) (actual time=1,347.548..1,347.548 rows=18,008 loops=1)

  • Output: adins.net_cost, adins.target_impressions, adins.brand_id, adins.target_id, adins.configuration_id, mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, bto.target_id, bto.objective_id, brand.name, rollup.id, rollup.name, mdm_mediagrouplist.media_group_id, mdm_mediagroup.name, base_target.rif_target_id, base_media_rfi.r1, opt_target.rif_target_id, opt_target.id, opt_media_rfi.r1, a18_media_rfi.r1, flrf.cal_impact
  • Buckets: 16384 Batches: 4 Memory Usage: 3817kB
16. 47.288 1,331.317 ↑ 1.4 18,008 1

Merge Left Join (cost=298,532.04..299,895.44 rows=26,061 width=314) (actual time=1,246.539..1,331.317 rows=18,008 loops=1)

  • Output: adins.net_cost, adins.target_impressions, adins.brand_id, adins.target_id, adins.configuration_id, mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, bto.target_id, bto.objective_id, brand.name, rollup.id, rollup.name, mdm_mediagrouplist.media_group_id, mdm_mediagroup.name, base_target.rif_target_id, base_media_rfi.r1, opt_target.rif_target_id, opt_target.id, opt_media_rfi.r1, a18_media_rfi.r1, flrf.cal_impact
  • Merge Cond: ((mdm_mediagrouplist.media_group_id = flrf.media_group_id) AND (adins.configuration_id = flrf.configuration_id) AND (adins.brand_id = flrf.brand_id) AND (bto.objective_id = flrf.objective_id) AND (bto.target_id = flrf.target_id))
17. 59.911 1,124.451 ↑ 1.4 18,008 1

Sort (cost=290,122.74..290,187.90 rows=26,061 width=306) (actual time=1,114.457..1,124.451 rows=18,008 loops=1)

  • Output: adins.net_cost, adins.target_impressions, adins.brand_id, adins.target_id, adins.configuration_id, mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, bto.target_id, bto.objective_id, brand.name, rollup.id, rollup.name, mdm_mediagrouplist.media_group_id, mdm_mediagroup.name, base_target.rif_target_id, base_media_rfi.r1, opt_target.rif_target_id, opt_target.id, opt_media_rfi.r1, a18_media_rfi.r1
  • Sort Key: mdm_mediagrouplist.media_group_id, adins.configuration_id, adins.brand_id, bto.objective_id, bto.target_id
  • Sort Method: external merge Disk: 4296kB
18. 84.958 1,064.540 ↑ 1.4 18,008 1

Hash Left Join (cost=190,550.47..284,469.72 rows=26,061 width=306) (actual time=772.180..1,064.540 rows=18,008 loops=1)

  • Output: adins.net_cost, adins.target_impressions, adins.brand_id, adins.target_id, adins.configuration_id, mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, bto.target_id, bto.objective_id, brand.name, rollup.id, rollup.name, mdm_mediagrouplist.media_group_id, mdm_mediagroup.name, base_target.rif_target_id, base_media_rfi.r1, opt_target.rif_target_id, opt_target.id, opt_media_rfi.r1, a18_media_rfi.r1
  • Hash Cond: ((a18_target.rif_target_id = a18_media_rfi.target_id) AND (adins.media_id = a18_media_rfi.media_id))
19. 28.495 374.898 ↑ 1.4 18,008 1

Nested Loop Left Join (cost=151,622.69..230,908.67 rows=26,061 width=306) (actual time=167.026..374.898 rows=18,008 loops=1)

  • Output: adins.net_cost, adins.target_impressions, adins.brand_id, adins.target_id, adins.configuration_id, adins.media_id, mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, bto.target_id, bto.objective_id, brand.name, rollup.id, rollup.name, mdm_mediagrouplist.media_group_id, mdm_mediagroup.name, base_target.rif_target_id, base_media_rfi.r1, opt_target.rif_target_id, opt_target.id, opt_media_rfi.r1, a18_target.rif_target_id
20. 0.000 328.395 ↑ 1.4 18,008 1

Gather Merge (cost=151,622.42..230,574.62 rows=26,061 width=302) (actual time=167.015..328.395 rows=18,008 loops=1)

  • Output: adins.net_cost, adins.target_impressions, adins.brand_id, adins.target_id, adins.configuration_id, adins.media_id, mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, bto.target_id, bto.objective_id, brand.name, rollup.id, rollup.name, mdm_mediagrouplist.media_group_id, mdm_mediagroup.name, base_target.rif_target_id, base_media_rfi.r1, opt_target.rif_target_id, opt_target.id, opt_media_rfi.r1
  • Workers Planned: 2
  • Workers Launched: 2
21. 40.593 667.134 ↑ 1.8 6,003 3

Nested Loop Left Join (cost=150,622.40..226,566.51 rows=10,859 width=302) (actual time=149.193..222.378 rows=6,003 loops=3)

  • Output: adins.net_cost, adins.target_impressions, adins.brand_id, adins.target_id, adins.configuration_id, adins.media_id, mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, bto.target_id, bto.objective_id, brand.name, rollup.id, rollup.name, mdm_mediagrouplist.media_group_id, mdm_mediagroup.name, base_target.rif_target_id, base_media_rfi.r1, opt_target.rif_target_id, opt_target.id, opt_media_rfi.r1
  • Join Filter: (opt_media_rfi.target_id = opt_target.rif_target_id)
  • Rows Removed by Join Filter: 8719
  • Worker 0: actual time=146.260..221.395 rows=6110 loops=1
  • Worker 1: actual time=136.055..198.314 rows=4794 loops=1
22. 41.916 572.517 ↑ 1.8 6,003 3

Nested Loop Left Join (cost=150,621.97..188,682.09 rows=10,859 width=294) (actual time=149.173..190.839 rows=6,003 loops=3)

  • Output: adins.net_cost, adins.target_impressions, adins.brand_id, adins.target_id, adins.configuration_id, adins.media_id, mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, bto.target_id, bto.objective_id, brand.name, rollup.id, rollup.name, mdm_mediagrouplist.media_group_id, mdm_mediagroup.name, base_target.rif_target_id, base_media_rfi.r1, opt_target.rif_target_id, opt_target.id
  • Join Filter: (base_media_rfi.target_id = base_target.rif_target_id)
  • Rows Removed by Join Filter: 8719
  • Worker 0: actual time=146.229..189.136 rows=6110 loops=1
  • Worker 1: actual time=136.043..171.432 rows=4794 loops=1
23. 20.055 476.577 ↑ 1.8 6,003 3

Merge Left Join (cost=150,621.55..150,797.67 rows=10,859 width=286) (actual time=149.144..158.859 rows=6,003 loops=3)

  • Output: adins.net_cost, adins.target_impressions, adins.brand_id, adins.target_id, adins.configuration_id, adins.media_id, mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, bto.target_id, bto.objective_id, brand.name, rollup.id, rollup.name, mdm_mediagrouplist.media_group_id, mdm_mediagroup.name, base_target.rif_target_id, opt_target.rif_target_id, opt_target.id
  • Inner Unique: true
  • Merge Cond: (mdm_mediagrouplist.media_group_id = mdm_mediagroup.id)
  • Worker 0: actual time=146.186..156.250 rows=6110 loops=1
  • Worker 1: actual time=136.024..144.276 rows=4794 loops=1
24. 21.423 446.697 ↑ 1.8 6,003 3

Sort (cost=150,416.59..150,443.74 rows=10,859 width=269) (actual time=146.659..148.899 rows=6,003 loops=3)

  • Output: adins.net_cost, adins.target_impressions, adins.brand_id, adins.target_id, adins.configuration_id, adins.media_id, mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, bto.target_id, bto.objective_id, brand.name, rollup.id, rollup.name, mdm_mediagrouplist.media_group_id, base_target.rif_target_id, opt_target.rif_target_id, opt_target.id
  • Sort Key: mdm_mediagrouplist.media_group_id
  • Sort Method: quicksort Memory: 2080kB
  • Worker 0: actual time=143.680..146.017 rows=6110 loops=1
  • Worker 1: actual time=133.343..135.227 rows=4794 loops=1
25. 17.208 425.274 ↑ 1.8 6,003 3

Merge Left Join (cost=149,523.42..149,688.68 rows=10,859 width=269) (actual time=134.028..141.758 rows=6,003 loops=3)

  • Output: adins.net_cost, adins.target_impressions, adins.brand_id, adins.target_id, adins.configuration_id, adins.media_id, mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, bto.target_id, bto.objective_id, brand.name, rollup.id, rollup.name, mdm_mediagrouplist.media_group_id, base_target.rif_target_id, opt_target.rif_target_id, opt_target.id
  • Inner Unique: true
  • Merge Cond: (bto.target_id = opt_target.id)
  • Worker 0: actual time=131.701..139.043 rows=6110 loops=1
  • Worker 1: actual time=121.499..128.775 rows=4794 loops=1
26. 20.349 406.122 ↑ 1.8 6,003 3

Sort (cost=149,490.49..149,517.63 rows=10,859 width=261) (actual time=133.215..135.374 rows=6,003 loops=3)

  • Output: adins.net_cost, adins.target_impressions, adins.brand_id, adins.target_id, adins.configuration_id, adins.media_id, mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, bto.target_id, bto.objective_id, brand.name, rollup.id, rollup.name, mdm_mediagrouplist.media_group_id, base_target.rif_target_id
  • Sort Key: bto.target_id
  • Sort Method: quicksort Memory: 2080kB
  • Worker 0: actual time=130.895..132.947 rows=6110 loops=1
  • Worker 1: actual time=120.601..122.685 rows=4794 loops=1
27. 16.863 385.773 ↑ 1.8 6,003 3

Merge Left Join (cost=148,597.35..148,762.57 rows=10,859 width=261) (actual time=120.664..128.591 rows=6,003 loops=3)

  • Output: adins.net_cost, adins.target_impressions, adins.brand_id, adins.target_id, adins.configuration_id, adins.media_id, mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, bto.target_id, bto.objective_id, brand.name, rollup.id, rollup.name, mdm_mediagrouplist.media_group_id, base_target.rif_target_id
  • Inner Unique: true
  • Merge Cond: (adins.target_id = base_target.id)
  • Worker 0: actual time=118.144..126.297 rows=6110 loops=1
  • Worker 1: actual time=109.985..116.658 rows=4794 loops=1
28. 20.829 367.071 ↑ 1.8 6,003 3

Sort (cost=148,564.42..148,591.57 rows=10,859 width=257) (actual time=120.195..122.357 rows=6,003 loops=3)

  • Output: adins.net_cost, adins.target_impressions, adins.brand_id, adins.target_id, adins.configuration_id, adins.media_id, mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, bto.target_id, bto.objective_id, brand.name, rollup.id, rollup.name, mdm_mediagrouplist.media_group_id
  • Sort Key: adins.target_id
  • Sort Method: quicksort Memory: 2080kB
  • Worker 0: actual time=117.684..119.952 rows=6110 loops=1
  • Worker 1: actual time=109.529..111.321 rows=4794 loops=1
29. 31.470 346.242 ↑ 1.8 6,003 3

Nested Loop Left Join (cost=134,643.45..147,836.51 rows=10,859 width=257) (actual time=54.019..115.414 rows=6,003 loops=3)

  • Output: adins.net_cost, adins.target_impressions, adins.brand_id, adins.target_id, adins.configuration_id, adins.media_id, mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, bto.target_id, bto.objective_id, brand.name, rollup.id, rollup.name, mdm_mediagrouplist.media_group_id
  • Join Filter: (mdm_mediagrouplist.configuration_id = adins.configuration_id)
  • Rows Removed by Join Filter: 2503
  • Worker 0: actual time=51.988..112.971 rows=6110 loops=1
  • Worker 1: actual time=50.595..105.343 rows=4794 loops=1
30. 25.076 260.748 ↑ 1.8 6,003 3

Nested Loop Left Join (cost=134,643.03..141,767.27 rows=10,859 width=253) (actual time=54.002..86.916 rows=6,003 loops=3)

  • Output: adins.net_cost, adins.target_impressions, adins.brand_id, adins.target_id, adins.configuration_id, adins.media_id, mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, bto.target_id, bto.objective_id, brand.name, rollup.id, rollup.name
  • Inner Unique: true
  • Worker 0: actual time=51.969..84.911 rows=6110 loops=1
  • Worker 1: actual time=50.574..79.712 rows=4794 loops=1
31. 24.663 199.656 ↑ 1.8 6,003 3

Merge Left Join (cost=134,642.60..134,734.13 rows=10,859 width=165) (actual time=53.984..66.552 rows=6,003 loops=3)

  • Output: adins.net_cost, adins.target_impressions, adins.brand_id, adins.target_id, adins.configuration_id, adins.media_id, mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, mdm_media.parent_id, bto.target_id, bto.objective_id, brand.name
  • Merge Cond: ((adins.brand_id = bto.brand_id) AND (report.campaign_id = bto.campaign_id))
  • Worker 0: actual time=51.952..64.660 rows=6110 loops=1
  • Worker 1: actual time=50.552..61.490 rows=4794 loops=1
32. 20.925 161.349 ↑ 1.8 6,003 3

Sort (cost=134,561.61..134,588.76 rows=10,859 width=147) (actual time=51.532..53.783 rows=6,003 loops=3)

  • Output: adins.net_cost, adins.target_impressions, adins.brand_id, adins.target_id, adins.configuration_id, adins.media_id, mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, mdm_media.parent_id, report.campaign_id
  • Sort Key: adins.brand_id, report.campaign_id
  • Sort Method: quicksort Memory: 1927kB
  • Worker 0: actual time=49.793..52.055 rows=6110 loops=1
  • Worker 1: actual time=47.580..49.535 rows=4794 loops=1
33. 24.990 140.424 ↑ 1.8 6,003 3

Merge Left Join (cost=133,623.77..133,833.70 rows=10,859 width=147) (actual time=34.399..46.808 rows=6,003 loops=3)

  • Output: adins.net_cost, adins.target_impressions, adins.brand_id, adins.target_id, adins.configuration_id, adins.media_id, mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, mdm_media.parent_id, report.campaign_id
  • Merge Cond: (adins.configuration_id = config.id)
  • Worker 0: actual time=32.902..45.193 rows=6110 loops=1
  • Worker 1: actual time=32.556..43.495 rows=4794 loops=1
34. 19.215 96.288 ↑ 1.8 6,003 3

Sort (cost=133,478.48..133,505.63 rows=10,859 width=143) (actual time=29.818..32.096 rows=6,003 loops=3)

  • Output: adins.net_cost, adins.target_impressions, adins.brand_id, adins.target_id, adins.configuration_id, adins.media_id, mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, mdm_media.parent_id
  • Sort Key: adins.configuration_id
  • Sort Method: quicksort Memory: 1927kB
  • Worker 0: actual time=28.429..30.717 rows=6110 loops=1
  • Worker 1: actual time=27.763..29.772 rows=4794 loops=1
35. 28.124 77.073 ↑ 1.8 6,003 3

Nested Loop Left Join (cost=669.80..132,750.57 rows=10,859 width=143) (actual time=0.379..25.691 rows=6,003 loops=3)

  • Output: adins.net_cost, adins.target_impressions, adins.brand_id, adins.target_id, adins.configuration_id, adins.media_id, mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, mdm_media.parent_id
  • Inner Unique: true
  • Worker 0: actual time=0.048..24.414 rows=6110 loops=1
  • Worker 1: actual time=0.046..23.906 rows=4794 loops=1
36. 11.965 12.933 ↑ 1.8 6,003 3

Parallel Bitmap Heap Scan on public.mdm_adinsertion adins (cost=669.38..87,709.06 rows=10,859 width=32) (actual time=0.361..4.311 rows=6,003 loops=3)

  • Output: adins.net_cost, adins.target_impressions, adins.brand_id, adins.target_id, adins.configuration_id, adins.media_id
  • Recheck Cond: (adins.configuration_id = ANY ('{1489,1490}'::integer[]))
  • Filter: (adins.net_cost > '0'::double precision)
  • Heap Blocks: exact=152
  • Worker 0: actual time=0.026..3.819 rows=6110 loops=1
  • Worker 1: actual time=0.030..3.736 rows=4794 loops=1
37. 0.968 0.968 ↑ 1.5 18,008 1

Bitmap Index Scan on mdm_adinsertion_ab62a495 (cost=0.00..662.86 rows=26,399 width=0) (actual time=0.968..0.968 rows=18,008 loops=1)

  • Index Cond: (adins.configuration_id = ANY ('{1489,1490}'::integer[]))
38. 36.016 36.016 ↑ 1.0 1 18,008

Index Scan using mdm_media_pkey on public.mdm_media (cost=0.43..4.15 rows=1 width=111) (actual time=0.002..0.002 rows=1 loops=18,008)

  • Output: mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, mdm_media.parent_id
  • Index Cond: (mdm_media.id = adins.media_id)
  • Worker 0: actual time=0.002..0.002 rows=1 loops=6110
  • Worker 1: actual time=0.003..0.003 rows=1 loops=4794
39. 9.972 19.146 ↓ 6.3 7,001 3

Sort (cost=141.29..144.08 rows=1,116 width=8) (actual time=3.733..6.382 rows=7,001 loops=3)

  • Output: config.id, report.campaign_id
  • Sort Key: config.id
  • Sort Method: quicksort Memory: 103kB
  • Worker 0: actual time=3.649..6.299 rows=7108 loops=1
  • Worker 1: actual time=3.927..6.286 rows=5792 loops=1
40. 4.152 9.174 ↓ 1.0 1,158 3

Hash Right Join (cost=35.11..84.79 rows=1,116 width=8) (actual time=1.134..3.058 rows=1,158 loops=3)

  • Output: config.id, report.campaign_id
  • Inner Unique: true
  • Hash Cond: (report.id = config.workpackage_id)
  • Worker 0: actual time=1.131..3.006 rows=1158 loops=1
  • Worker 1: actual time=1.213..3.216 rows=1158 loops=1
41. 1.944 1.944 ↓ 1.0 1,448 3

Seq Scan on public.erm_client_report report (cost=0.00..31.45 rows=1,445 width=8) (actual time=0.007..0.648 rows=1,448 loops=3)

  • Output: report.id, report.name, report.report_period, report.report_phase, report.meta_1, report.meta_2, report.meta_3, report.meta_4, report.start_date, report.end_date, report.created_at, report.updated_at, report.campaign_id, report.active, report.approval_state, report.state_id
  • Worker 0: actual time=0.006..0.635 rows=1448 loops=1
  • Worker 1: actual time=0.011..0.665 rows=1448 loops=1
42. 1.497 3.078 ↓ 1.0 1,158 3

Hash (cost=21.16..21.16 rows=1,116 width=8) (actual time=1.026..1.026 rows=1,158 loops=3)

  • Output: config.id, config.workpackage_id
  • Buckets: 2048 Batches: 1 Memory Usage: 62kB
  • Worker 0: actual time=1.008..1.008 rows=1158 loops=1
  • Worker 1: actual time=1.049..1.049 rows=1158 loops=1
43. 1.581 1.581 ↓ 1.0 1,158 3

Seq Scan on public.mevo_configuration config (cost=0.00..21.16 rows=1,116 width=8) (actual time=0.017..0.527 rows=1,158 loops=3)

  • Output: config.id, config.workpackage_id
  • Worker 0: actual time=0.022..0.517 rows=1158 loops=1
  • Worker 1: actual time=0.024..0.544 rows=1158 loops=1
44. 8.616 13.644 ↓ 8.4 6,387 3

Sort (cost=80.98..82.88 rows=761 width=30) (actual time=2.186..4.548 rows=6,387 loops=3)

  • Output: bto.target_id, bto.objective_id, bto.campaign_id, bto.brand_id, brand.name
  • Sort Key: bto.brand_id, bto.campaign_id
  • Sort Method: quicksort Memory: 87kB
  • Worker 0: actual time=1.901..4.305 rows=6494 loops=1
  • Worker 1: actual time=2.702..4.741 rows=5178 loops=1
45. 2.199 5.028 ↓ 1.1 801 3

Hash Left Join (cost=20.35..44.56 rows=761 width=30) (actual time=0.632..1.676 rows=801 loops=3)

  • Output: bto.target_id, bto.objective_id, bto.campaign_id, bto.brand_id, brand.name
  • Inner Unique: true
  • Hash Cond: (bto.brand_id = brand.id)
  • Worker 0: actual time=0.519..1.450 rows=801 loops=1
  • Worker 1: actual time=0.843..2.104 rows=801 loops=1
46. 1.023 1.023 ↓ 1.1 801 3

Seq Scan on public.mevo_configbrandtargetobjective bto (cost=0.00..14.61 rows=761 width=16) (actual time=0.017..0.341 rows=801 loops=3)

  • Output: bto.id, bto.active, bto.brand_id, bto.campaign_id, bto.objective_id, bto.target_id, bto."primary
  • Worker 0: actual time=0.018..0.311 rows=801 loops=1
  • Worker 1: actual time=0.026..0.418 rows=801 loops=1
47. 0.930 1.806 ↓ 1.0 555 3

Hash (cost=13.49..13.49 rows=549 width=18) (actual time=0.602..0.602 rows=555 loops=3)

  • Output: brand.name, brand.id
  • Buckets: 1024 Batches: 1 Memory Usage: 36kB
  • Worker 0: actual time=0.491..0.491 rows=555 loops=1
  • Worker 1: actual time=0.803..0.803 rows=555 loops=1
48. 0.876 0.876 ↓ 1.0 555 3

Seq Scan on public.mdm_brand brand (cost=0.00..13.49 rows=549 width=18) (actual time=0.007..0.292 rows=555 loops=3)

  • Output: brand.name, brand.id
  • Worker 0: actual time=0.007..0.236 rows=555 loops=1
  • Worker 1: actual time=0.010..0.387 rows=555 loops=1
49. 36.016 36.016 ↑ 1.0 1 18,008

Index Scan using mdm_media_pkey on public.mdm_media rollup (cost=0.43..0.65 rows=1 width=92) (actual time=0.002..0.002 rows=1 loops=18,008)

  • Output: rollup.id, rollup.name
  • Index Cond: (rollup.id = mdm_media.parent_id)
  • Worker 0: actual time=0.002..0.002 rows=1 loops=6110
  • Worker 1: actual time=0.002..0.002 rows=1 loops=4794
50. 54.024 54.024 ↑ 4.0 1 18,008

Index Scan using mdm_mediagrouplist_35bf24f6 on public.mdm_mediagrouplist (cost=0.42..0.51 rows=4 width=12) (actual time=0.002..0.003 rows=1 loops=18,008)

  • Output: mdm_mediagrouplist.id, mdm_mediagrouplist.created_at, mdm_mediagrouplist.updated_at, mdm_mediagrouplist.media_id, mdm_mediagrouplist.media_group_id, mdm_mediagrouplist.configuration_id
  • Index Cond: (mdm_mediagrouplist.media_id = mdm_media.id)
  • Worker 0: actual time=0.002..0.003 rows=1 loops=6110
  • Worker 1: actual time=0.002..0.003 rows=2 loops=4794
51. 1.146 1.839 ↑ 1.1 421 3

Sort (cost=32.93..34.12 rows=476 width=8) (actual time=0.465..0.613 rows=421 loops=3)

  • Output: base_target.rif_target_id, base_target.id
  • Sort Key: base_target.id
  • Sort Method: quicksort Memory: 47kB
  • Worker 0: actual time=0.456..0.613 rows=421 loops=1
  • Worker 1: actual time=0.452..0.582 rows=421 loops=1
52. 0.693 0.693 ↓ 1.0 478 3

Seq Scan on public.mdm_target base_target (cost=0.00..11.76 rows=476 width=8) (actual time=0.018..0.231 rows=478 loops=3)

  • Output: base_target.rif_target_id, base_target.id
  • Worker 0: actual time=0.021..0.229 rows=478 loops=1
  • Worker 1: actual time=0.026..0.230 rows=478 loops=1
53. 1.212 1.944 ↑ 1.1 421 3

Sort (cost=32.93..34.12 rows=476 width=8) (actual time=0.502..0.648 rows=421 loops=3)

  • Output: opt_target.rif_target_id, opt_target.id
  • Sort Key: opt_target.id
  • Sort Method: quicksort Memory: 47kB
  • Worker 0: actual time=0.476..0.631 rows=421 loops=1
  • Worker 1: actual time=0.582..0.731 rows=421 loops=1
54. 0.732 0.732 ↓ 1.0 478 3

Seq Scan on public.mdm_target opt_target (cost=0.00..11.76 rows=476 width=8) (actual time=0.008..0.244 rows=478 loops=3)

  • Output: opt_target.rif_target_id, opt_target.id
  • Worker 0: actual time=0.007..0.231 rows=478 loops=1
  • Worker 1: actual time=0.010..0.289 rows=478 loops=1
55. 6.534 9.825 ↑ 1.2 2,300 3

Sort (cost=204.95..211.57 rows=2,647 width=21) (actual time=2.478..3.275 rows=2,300 loops=3)

  • Output: mdm_mediagroup.name, mdm_mediagroup.id
  • Sort Key: mdm_mediagroup.id
  • Sort Method: quicksort Memory: 283kB
  • Worker 0: actual time=2.501..3.321 rows=2139 loops=1
  • Worker 1: actual time=2.673..3.444 rows=2139 loops=1
56. 3.291 3.291 ↓ 1.0 2,650 3

Seq Scan on public.mdm_mediagroup (cost=0.00..54.47 rows=2,647 width=21) (actual time=0.016..1.097 rows=2,650 loops=3)

  • Output: mdm_mediagroup.name, mdm_mediagroup.id
  • Worker 0: actual time=0.018..1.107 rows=2650 loops=1
  • Worker 1: actual time=0.022..1.192 rows=2650 loops=1
57. 54.024 54.024 ↑ 2.5 2 18,008

Index Scan using mdm_mediarfi_35bf24f6 on public.mdm_media_rfi base_media_rfi (cost=0.42..3.43 rows=5 width=16) (actual time=0.002..0.003 rows=2 loops=18,008)

  • Output: base_media_rfi.id, base_media_rfi.r1, base_media_rfi.r2, base_media_rfi.r3, base_media_rfi.r4, base_media_rfi.r5, base_media_rfi.r6, base_media_rfi.r7, base_media_rfi.r8, base_media_rfi.f1, base_media_rfi.f2, base_media_rfi.f3, base_media_rfi.f4, base_media_rfi.f5, base_media_rfi.f6, base_media_rfi.f7, base_media_rfi.f8, base_media_rfi.i1, base_media_rfi.i2, base_media_rfi.i3, base_media_rfi.i4, base_media_rfi.i5, base_media_rfi.i6, base_media_rfi.i7, base_media_rfi.i8, base_media_rfi.created_at, base_media_rfi.updated_at, base_media_rfi.media_id, base_media_rfi.target_id, base_media_rfi.file_id
  • Index Cond: (base_media_rfi.media_id = adins.media_id)
  • Worker 0: actual time=0.002..0.003 rows=2 loops=6110
  • Worker 1: actual time=0.002..0.003 rows=3 loops=4794
58. 54.024 54.024 ↑ 2.5 2 18,008

Index Scan using mdm_mediarfi_35bf24f6 on public.mdm_media_rfi opt_media_rfi (cost=0.42..3.43 rows=5 width=16) (actual time=0.002..0.003 rows=2 loops=18,008)

  • Output: opt_media_rfi.id, opt_media_rfi.r1, opt_media_rfi.r2, opt_media_rfi.r3, opt_media_rfi.r4, opt_media_rfi.r5, opt_media_rfi.r6, opt_media_rfi.r7, opt_media_rfi.r8, opt_media_rfi.f1, opt_media_rfi.f2, opt_media_rfi.f3, opt_media_rfi.f4, opt_media_rfi.f5, opt_media_rfi.f6, opt_media_rfi.f7, opt_media_rfi.f8, opt_media_rfi.i1, opt_media_rfi.i2, opt_media_rfi.i3, opt_media_rfi.i4, opt_media_rfi.i5, opt_media_rfi.i6, opt_media_rfi.i7, opt_media_rfi.i8, opt_media_rfi.created_at, opt_media_rfi.updated_at, opt_media_rfi.media_id, opt_media_rfi.target_id, opt_media_rfi.file_id
  • Index Cond: (opt_media_rfi.media_id = adins.media_id)
  • Worker 0: actual time=0.002..0.003 rows=2 loops=6110
  • Worker 1: actual time=0.002..0.003 rows=3 loops=4794
59. 17.998 18.008 ↑ 1.0 1 18,008

Materialize (cost=0.27..8.30 rows=1 width=4) (actual time=0.000..0.001 rows=1 loops=18,008)

  • Output: a18_target.rif_target_id
60. 0.010 0.010 ↑ 1.0 1 1

Index Scan using mdm_target_pkey on public.mdm_target a18_target (cost=0.27..8.29 rows=1 width=4) (actual time=0.006..0.010 rows=1 loops=1)

  • Output: a18_target.rif_target_id
  • Index Cond: (a18_target.id = 1)
61. 285.618 604.684 ↓ 1.0 616,215 1

Hash (cost=26,738.91..26,738.91 rows=612,991 width=16) (actual time=604.684..604.684 rows=616,215 loops=1)

  • Output: a18_media_rfi.r1, a18_media_rfi.target_id, a18_media_rfi.media_id
  • Buckets: 131072 Batches: 16 Memory Usage: 2836kB
62. 319.066 319.066 ↓ 1.0 616,215 1

Seq Scan on public.mdm_media_rfi a18_media_rfi (cost=0.00..26,738.91 rows=612,991 width=16) (actual time=0.004..319.066 rows=616,215 loops=1)

  • Output: a18_media_rfi.r1, a18_media_rfi.target_id, a18_media_rfi.media_id
63. 118.696 159.578 ↓ 1.3 83,061 1

Sort (cost=8,409.30..8,573.81 rows=65,804 width=28) (actual time=130.605..159.578 rows=83,061 loops=1)

  • Output: flrf.cal_impact, flrf.configuration_id, flrf.brand_id, flrf.media_group_id, flrf.objective_id, flrf.target_id
  • Sort Key: flrf.media_group_id, flrf.configuration_id, flrf.brand_id, flrf.objective_id, flrf.target_id
  • Sort Method: external sort Disk: 2544kB
64. 40.882 40.882 ↓ 1.0 66,107 1

Seq Scan on public.mna_flrf flrf (cost=0.00..3,143.04 rows=65,804 width=28) (actual time=0.008..40.882 rows=66,107 loops=1)

  • Output: flrf.cal_impact, flrf.configuration_id, flrf.brand_id, flrf.media_group_id, flrf.objective_id, flrf.target_id