explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6TMD

Settings
# exclusive inclusive rows x rows loops node
1. 173.770 5,326.406 ↓ 10,056.0 10,056 1

Sort (cost=1,249,620.88..1,249,620.89 rows=1 width=397) (actual time=5,319.841..5,326.406 rows=10,056 loops=1)

  • Output: adins.spend, adins.target_impressions, adins.cpm, mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, rollup.id, rollup.name, adins.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.buy_target_id, bto.target_id, bto.objective_id, opt_target.name, flrf.objective_name, (round(flrf.cal_impact)), adins.total_impact, adins.configuration_id, flrf.configuration_id, flrf.target_id, flrf.objective_id
  • Sort Key: adins.configuration_id, adins.brand_id, rollup.name, mdm_media.short_name, bto.target_id, bto.objective_id
  • Sort Method: external merge Disk: 3200kB
2. 14.839 5,152.636 ↓ 10,056.0 10,056 1

Nested Loop (cost=1,247,517.12..1,249,620.87 rows=1 width=397) (actual time=2,464.887..5,152.636 rows=10,056 loops=1)

  • Output: adins.spend, adins.target_impressions, adins.cpm, mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, rollup.id, rollup.name, adins.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.buy_target_id, bto.target_id, bto.objective_id, opt_target.name, flrf.objective_name, round(flrf.cal_impact), adins.total_impact, adins.configuration_id, flrf.configuration_id, flrf.target_id, flrf.objective_id
  • Inner Unique: true
3. 360.752 5,117.685 ↓ 10,056.0 10,056 1

Nested Loop (cost=1,247,516.70..1,249,620.21 rows=1 width=310) (actual time=2,464.879..5,117.685 rows=10,056 loops=1)

  • Output: flrf.objective_name, flrf.cal_impact, flrf.configuration_id, flrf.target_id, flrf.objective_id, bto.target_id, bto.objective_id, brand.name, adins.spend, adins.target_impressions, adins.cpm, adins.media_group_id, adins.brand_id, adins.buy_target_id, adins.total_impact, adins.configuration_id, base_target.rif_target_id, base_media_rfi.r1, opt_target.rif_target_id, opt_target.name, opt_media_rfi.r1, a18_media_rfi.r1, mdm_targetpopulation.population, mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, mdm_media.parent_id, media_base_pop.population, media_opt_pop.population, mdm_mediagroup.name
  • Join Filter: (bto.target_id = media_opt_pop.target_id)
  • Rows Removed by Join Filter: 1410261
4. 8.837 4,053.013 ↓ 10,056.0 10,056 1

Nested Loop (cost=1,247,516.41..1,249,615.70 rows=1 width=318) (actual time=2,464.802..4,053.013 rows=10,056 loops=1)

  • Output: flrf.objective_name, flrf.cal_impact, flrf.configuration_id, flrf.target_id, flrf.objective_id, bto.target_id, bto.objective_id, brand.name, adins.spend, adins.target_impressions, adins.cpm, adins.media_group_id, adins.brand_id, adins.buy_target_id, adins.total_impact, adins.configuration_id, adins.opt_target_id, base_target.rif_target_id, base_media_rfi.r1, opt_target.rif_target_id, opt_target.name, opt_target.id, opt_media_rfi.r1, a18_media_rfi.r1, mdm_targetpopulation.population, mdm_targetpopulation.target_id, mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, mdm_media.parent_id, media_base_pop.population, media_base_pop.geography_id, mdm_mediagroup.name
  • Inner Unique: true
5. 27.527 4,024.064 ↓ 10,056.0 10,056 1

Nested Loop (cost=1,247,516.13..1,249,615.40 rows=1 width=305) (actual time=2,464.793..4,024.064 rows=10,056 loops=1)

  • Output: flrf.objective_name, flrf.cal_impact, flrf.configuration_id, flrf.target_id, flrf.objective_id, flrf.media_group_id, bto.target_id, bto.objective_id, brand.name, adins.spend, adins.target_impressions, adins.cpm, adins.media_group_id, adins.brand_id, adins.buy_target_id, adins.total_impact, adins.configuration_id, adins.opt_target_id, base_target.rif_target_id, base_media_rfi.r1, opt_target.rif_target_id, opt_target.name, opt_target.id, opt_media_rfi.r1, a18_media_rfi.r1, mdm_targetpopulation.population, mdm_targetpopulation.target_id, mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, mdm_media.parent_id, media_base_pop.population, media_base_pop.geography_id
  • Inner Unique: true
6. 24.618 3,872.223 ↓ 20,719.0 20,719 1

Nested Loop (cost=1,247,515.86..1,249,615.09 rows=1 width=309) (actual time=2,464.766..3,872.223 rows=20,719 loops=1)

  • Output: flrf.objective_name, flrf.cal_impact, flrf.configuration_id, flrf.target_id, flrf.objective_id, flrf.media_group_id, bto.target_id, bto.objective_id, brand.name, adins.spend, adins.target_impressions, adins.cpm, adins.media_group_id, adins.brand_id, adins.buy_target_id, adins.total_impact, adins.configuration_id, adins.opt_target_id, base_target.rif_target_id, base_media_rfi.r1, opt_target.rif_target_id, opt_target.name, opt_target.id, opt_media_rfi.r1, a18_media_rfi.r1, a18_media_rfi.target_id, mdm_targetpopulation.population, mdm_targetpopulation.target_id, mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, mdm_media.parent_id, media_base_pop.population, media_base_pop.geography_id
  • Join Filter: (base_media_rfi.media_id = a18_media_rfi.media_id)
7. 18.580 3,817.437 ↓ 10,056.0 10,056 1

Nested Loop (cost=1,247,515.43..1,249,614.43 rows=1 width=309) (actual time=2,464.760..3,817.437 rows=10,056 loops=1)

  • Output: flrf.objective_name, flrf.cal_impact, flrf.configuration_id, flrf.target_id, flrf.objective_id, flrf.media_group_id, bto.target_id, bto.objective_id, brand.name, adins.spend, adins.target_impressions, adins.cpm, adins.media_group_id, adins.brand_id, adins.buy_target_id, adins.total_impact, adins.configuration_id, adins.opt_target_id, adins.media_id, base_target.rif_target_id, base_media_rfi.r1, base_media_rfi.media_id, opt_target.rif_target_id, opt_target.name, opt_target.id, opt_media_rfi.r1, opt_media_rfi.media_id, mdm_targetpopulation.population, mdm_targetpopulation.target_id, mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, mdm_media.parent_id, media_base_pop.population, media_base_pop.geography_id
  • Join Filter: (bto.target_id = mdm_targetpopulation.target_id)
8. 19.432 3,467.009 ↓ 10,056.0 10,056 1

Nested Loop (cost=1,247,515.14..1,249,610.97 rows=1 width=297) (actual time=2,464.751..3,467.009 rows=10,056 loops=1)

  • Output: flrf.objective_name, flrf.cal_impact, flrf.configuration_id, flrf.target_id, flrf.objective_id, flrf.media_group_id, bto.target_id, bto.objective_id, brand.name, adins.spend, adins.target_impressions, adins.cpm, adins.media_group_id, adins.brand_id, adins.buy_target_id, adins.total_impact, adins.configuration_id, adins.opt_target_id, adins.media_id, base_target.rif_target_id, base_media_rfi.r1, base_media_rfi.media_id, opt_target.rif_target_id, opt_target.name, opt_target.id, opt_media_rfi.r1, opt_media_rfi.media_id, mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, mdm_media.parent_id, media_base_pop.population, media_base_pop.geography_id
  • Join Filter: ((base_media_rfi.media_id = opt_media_rfi.media_id) AND (opt_target.rif_target_id = opt_media_rfi.target_id))
  • Rows Removed by Join Filter: 10663
9. 10.137 3,407.353 ↓ 10,056.0 10,056 1

Nested Loop (cost=1,247,514.72..1,249,610.30 rows=1 width=285) (actual time=2,464.741..3,407.353 rows=10,056 loops=1)

  • Output: flrf.objective_name, flrf.cal_impact, flrf.configuration_id, flrf.target_id, flrf.objective_id, flrf.media_group_id, bto.target_id, bto.objective_id, brand.name, adins.spend, adins.target_impressions, adins.cpm, adins.media_group_id, adins.brand_id, adins.buy_target_id, adins.total_impact, adins.configuration_id, adins.opt_target_id, adins.media_id, base_target.rif_target_id, base_media_rfi.r1, base_media_rfi.media_id, opt_target.rif_target_id, opt_target.name, opt_target.id, mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, mdm_media.parent_id, media_base_pop.population, media_base_pop.geography_id
  • Inner Unique: true
  • Join Filter: (bto.target_id = opt_target.id)
10. 628.285 3,377.104 ↓ 10,056.0 10,056 1

Merge Join (cost=1,247,514.45..1,249,609.99 rows=1 width=257) (actual time=2,464.731..3,377.104 rows=10,056 loops=1)

  • Output: flrf.objective_name, flrf.cal_impact, flrf.configuration_id, flrf.target_id, flrf.objective_id, flrf.media_group_id, bto.target_id, bto.objective_id, brand.name, adins.spend, adins.target_impressions, adins.cpm, adins.media_group_id, adins.brand_id, adins.buy_target_id, adins.total_impact, adins.configuration_id, adins.opt_target_id, adins.media_id, base_target.rif_target_id, base_media_rfi.r1, base_media_rfi.media_id, mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, mdm_media.parent_id, media_base_pop.population, media_base_pop.geography_id
  • Merge Cond: (media_base_pop.geography_id = mdm_media.geography_id)
  • Join Filter: (base_target.id = media_base_pop.target_id)
  • Rows Removed by Join Filter: 1410261
11. 9.615 9.615 ↑ 1.7 17,503 1

Index Scan using mdm_targetpopulation_bba4d9cf on public.mdm_targetpopulation media_base_pop (cost=0.29..2,039.48 rows=29,558 width=16) (actual time=0.008..9.615 rows=17,503 loops=1)

  • Output: media_base_pop.id, media_base_pop.population, media_base_pop.created_at, media_base_pop.updated_at, media_base_pop.target_id, media_base_pop.geography_id
12. 280.321 2,739.204 ↓ 1,420,180.0 1,420,180 1

Materialize (cost=1,247,514.16..1,247,514.17 rows=1 width=249) (actual time=2,454.263..2,739.204 rows=1,420,180 loops=1)

  • Output: flrf.objective_name, flrf.cal_impact, flrf.configuration_id, flrf.target_id, flrf.objective_id, flrf.media_group_id, bto.target_id, bto.objective_id, brand.name, adins.spend, adins.target_impressions, adins.cpm, adins.media_group_id, adins.brand_id, adins.buy_target_id, adins.total_impact, adins.configuration_id, adins.opt_target_id, adins.media_id, base_target.rif_target_id, base_target.id, base_media_rfi.r1, base_media_rfi.media_id, mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, mdm_media.parent_id
13. 21.947 2,458.883 ↓ 10,056.0 10,056 1

Sort (cost=1,247,514.16..1,247,514.16 rows=1 width=249) (actual time=2,454.261..2,458.883 rows=10,056 loops=1)

  • Output: flrf.objective_name, flrf.cal_impact, flrf.configuration_id, flrf.target_id, flrf.objective_id, flrf.media_group_id, bto.target_id, bto.objective_id, brand.name, adins.spend, adins.target_impressions, adins.cpm, adins.media_group_id, adins.brand_id, adins.buy_target_id, adins.total_impact, adins.configuration_id, adins.opt_target_id, adins.media_id, base_target.rif_target_id, base_target.id, base_media_rfi.r1, base_media_rfi.media_id, mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, mdm_media.parent_id
  • Sort Key: mdm_media.geography_id
  • Sort Method: external merge Disk: 2712kB
14. 11.788 2,436.936 ↓ 10,056.0 10,056 1

Nested Loop (cost=1,247,496.25..1,247,514.15 rows=1 width=249) (actual time=2,110.463..2,436.936 rows=10,056 loops=1)

  • Output: flrf.objective_name, flrf.cal_impact, flrf.configuration_id, flrf.target_id, flrf.objective_id, flrf.media_group_id, bto.target_id, bto.objective_id, brand.name, adins.spend, adins.target_impressions, adins.cpm, adins.media_group_id, adins.brand_id, adins.buy_target_id, adins.total_impact, adins.configuration_id, adins.opt_target_id, adins.media_id, base_target.rif_target_id, base_target.id, base_media_rfi.r1, base_media_rfi.media_id, mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, mdm_media.parent_id
  • Inner Unique: true
15. 17.356 2,405.036 ↓ 10,056.0 10,056 1

Nested Loop (cost=1,247,495.82..1,247,513.32 rows=1 width=139) (actual time=2,110.452..2,405.036 rows=10,056 loops=1)

  • Output: flrf.objective_name, flrf.cal_impact, flrf.configuration_id, flrf.target_id, flrf.objective_id, flrf.media_group_id, bto.target_id, bto.objective_id, brand.name, adins.spend, adins.target_impressions, adins.cpm, adins.media_group_id, adins.brand_id, adins.buy_target_id, adins.total_impact, adins.configuration_id, adins.opt_target_id, adins.media_id, base_target.rif_target_id, base_target.id, base_media_rfi.r1, base_media_rfi.media_id
  • Join Filter: (base_target.rif_target_id = base_media_rfi.target_id)
  • Rows Removed by Join Filter: 10663
16. 12.664 2,357.512 ↓ 10,056.0 10,056 1

Nested Loop (cost=1,247,495.39..1,247,502.00 rows=1 width=127) (actual time=2,110.440..2,357.512 rows=10,056 loops=1)

  • Output: flrf.objective_name, flrf.cal_impact, flrf.configuration_id, flrf.target_id, flrf.objective_id, flrf.media_group_id, bto.target_id, bto.objective_id, brand.name, adins.spend, adins.target_impressions, adins.cpm, adins.media_group_id, adins.brand_id, adins.buy_target_id, adins.total_impact, adins.configuration_id, adins.opt_target_id, adins.media_id, base_target.rif_target_id, base_target.id
  • Inner Unique: true
  • Join Filter: (bto.brand_id = brand.id)
17. 12.874 2,334.792 ↓ 10,056.0 10,056 1

Nested Loop (cost=1,247,495.12..1,247,501.69 rows=1 width=121) (actual time=2,110.432..2,334.792 rows=10,056 loops=1)

  • Output: flrf.objective_name, flrf.cal_impact, flrf.configuration_id, flrf.target_id, flrf.objective_id, flrf.brand_id, flrf.media_group_id, bto.target_id, bto.objective_id, bto.brand_id, adins.spend, adins.target_impressions, adins.cpm, adins.media_group_id, adins.brand_id, adins.buy_target_id, adins.total_impact, adins.configuration_id, adins.opt_target_id, adins.media_id, base_target.rif_target_id, base_target.id
  • Inner Unique: true
  • Join Filter: (bto.campaign_id = report.campaign_id)
18. 14.067 2,311.862 ↓ 10,056.0 10,056 1

Nested Loop (cost=1,247,494.84..1,247,501.30 rows=1 width=129) (actual time=2,110.424..2,311.862 rows=10,056 loops=1)

  • Output: flrf.objective_name, flrf.cal_impact, flrf.configuration_id, flrf.target_id, flrf.objective_id, flrf.brand_id, flrf.media_group_id, config.workpackage_id, bto.target_id, bto.objective_id, bto.campaign_id, bto.brand_id, adins.spend, adins.target_impressions, adins.cpm, adins.media_group_id, adins.brand_id, adins.buy_target_id, adins.total_impact, adins.configuration_id, adins.opt_target_id, adins.media_id, base_target.rif_target_id, base_target.id
  • Inner Unique: true
19. 16.537 2,287.739 ↓ 10,056.0 10,056 1

Nested Loop (cost=1,247,494.56..1,247,501.00 rows=1 width=125) (actual time=2,110.409..2,287.739 rows=10,056 loops=1)

  • Output: flrf.objective_name, flrf.cal_impact, flrf.configuration_id, flrf.target_id, flrf.objective_id, flrf.brand_id, flrf.media_group_id, bto.target_id, bto.objective_id, bto.campaign_id, bto.brand_id, adins.spend, adins.target_impressions, adins.cpm, adins.media_group_id, adins.brand_id, adins.buy_target_id, adins.total_impact, adins.configuration_id, adins.opt_target_id, adins.media_id, base_target.rif_target_id, base_target.id
  • Join Filter: ((bto.brand_id = flrf.brand_id) AND (bto.objective_id = flrf.objective_id) AND (bto.target_id = flrf.target_id))
20. 7.207 2,120.362 ↓ 10,056.0 10,056 1

Merge Join (cost=1,247,489.60..1,247,492.00 rows=1 width=84) (actual time=2,110.363..2,120.362 rows=10,056 loops=1)

  • Output: bto.target_id, bto.objective_id, bto.campaign_id, bto.brand_id, adins.spend, adins.target_impressions, adins.cpm, adins.media_group_id, adins.brand_id, adins.buy_target_id, adins.total_impact, adins.configuration_id, adins.objective_id, adins.opt_target_id, adins.media_id, base_target.rif_target_id, base_target.id
  • Inner Unique: true
  • Merge Cond: (adins.buy_target_id = base_target.id)
21. 6.408 2,112.825 ↓ 10,056.0 10,056 1

Sort (cost=1,247,456.67..1,247,456.68 rows=1 width=76) (actual time=2,110.035..2,112.825 rows=10,056 loops=1)

  • Output: bto.target_id, bto.objective_id, bto.campaign_id, bto.brand_id, adins.spend, adins.target_impressions, adins.cpm, adins.media_group_id, adins.brand_id, adins.buy_target_id, adins.total_impact, adins.configuration_id, adins.objective_id, adins.opt_target_id, adins.media_id
  • Sort Key: adins.buy_target_id
  • Sort Method: quicksort Memory: 1799kB
22. 5.423 2,106.417 ↓ 10,056.0 10,056 1

Merge Join (cost=1,247,442.42..1,247,456.66 rows=1 width=76) (actual time=2,099.141..2,106.417 rows=10,056 loops=1)

  • Output: bto.target_id, bto.objective_id, bto.campaign_id, bto.brand_id, adins.spend, adins.target_impressions, adins.cpm, adins.media_group_id, adins.brand_id, adins.buy_target_id, adins.total_impact, adins.configuration_id, adins.objective_id, adins.opt_target_id, adins.media_id
  • Merge Cond: ((bto.target_id = adins.opt_target_id) AND (bto.brand_id = adins.brand_id) AND (bto.objective_id = adins.objective_id))
23. 0.523 0.756 ↑ 1.3 619 1

Sort (cost=53.71..55.71 rows=802 width=16) (actual time=0.630..0.756 rows=619 loops=1)

  • Output: bto.target_id, bto.objective_id, bto.campaign_id, bto.brand_id
  • Sort Key: bto.target_id, bto.brand_id, bto.objective_id
  • Sort Method: quicksort Memory: 62kB
24. 0.233 0.233 ↓ 1.0 809 1

Seq Scan on public.mevo_configbrandtargetobjective bto (cost=0.00..15.02 rows=802 width=16) (actual time=0.004..0.233 rows=809 loops=1)

  • Output: bto.target_id, bto.objective_id, bto.campaign_id, bto.brand_id
25. 5.857 2,100.238 ↓ 16.2 10,056 1

Sort (cost=1,247,388.72..1,247,390.27 rows=621 width=60) (actual time=2,098.225..2,100.238 rows=10,056 loops=1)

  • Output: adins.spend, adins.target_impressions, adins.cpm, adins.media_group_id, adins.brand_id, adins.buy_target_id, adins.total_impact, adins.configuration_id, adins.objective_id, adins.opt_target_id, adins.media_id
  • Sort Key: adins.opt_target_id, adins.brand_id, adins.objective_id
  • Sort Method: quicksort Memory: 1799kB
26. 4.327 2,094.381 ↓ 16.2 10,056 1

Subquery Scan on adins (cost=1,247,321.10..1,247,359.91 rows=621 width=60) (actual time=1,889.230..2,094.381 rows=10,056 loops=1)

  • Output: adins.spend, adins.target_impressions, adins.cpm, adins.media_group_id, adins.brand_id, adins.buy_target_id, adins.total_impact, adins.configuration_id, adins.objective_id, adins.opt_target_id, adins.media_id
27. 126.317 2,090.054 ↓ 16.2 10,056 1

GroupAggregate (cost=1,247,321.10..1,247,353.70 rows=621 width=60) (actual time=1,889.229..2,090.054 rows=10,056 loops=1)

  • Output: sum(adin.net_cost), sum(adin.target_impressions), (('1000'::double precision * sum(adin.net_cost)) / NULLIF(sum(adin.target_impressions), '0'::double precision)), adin.media_id, mgl2.media_group_id, adin.brand_id, adin.target_id, flrf_1.target_id, flrf_1.objective_id, adin.configuration_id, (round(sum(flrf_1.cal_impact)))
  • Group Key: adin.configuration_id, adin.media_id, mgl2.media_group_id, adin.brand_id, adin.target_id, flrf_1.target_id, flrf_1.objective_id, (round(sum(flrf_1.cal_impact)))
  • Filter: (sum(adin.net_cost) > '0'::double precision)
28. 485.929 1,963.737 ↓ 484.7 300,979 1

Sort (cost=1,247,321.10..1,247,322.65 rows=621 width=52) (actual time=1,889.205..1,963.737 rows=300,979 loops=1)

  • Output: adin.media_id, mgl2.media_group_id, adin.brand_id, adin.target_id, flrf_1.target_id, flrf_1.objective_id, adin.configuration_id, (round(sum(flrf_1.cal_impact))), adin.net_cost, adin.target_impressions
  • Sort Key: adin.configuration_id, adin.media_id, mgl2.media_group_id, adin.brand_id, adin.target_id, flrf_1.target_id, flrf_1.objective_id, (round(sum(flrf_1.cal_impact)))
  • Sort Method: external sort Disk: 19440kB
29. 237.745 1,477.808 ↓ 484.7 300,979 1

Nested Loop (cost=12,237.05..1,247,292.29 rows=621 width=52) (actual time=348.453..1,477.808 rows=300,979 loops=1)

  • Output: adin.media_id, mgl2.media_group_id, adin.brand_id, adin.target_id, flrf_1.target_id, flrf_1.objective_id, adin.configuration_id, (round(sum(flrf_1.cal_impact))), adin.net_cost, adin.target_impressions
  • Join Filter: (flrf_1.configuration_id = mgl2.configuration_id)
30. 135.619 638.105 ↓ 5.6 300,979 1

Nested Loop (cost=12,236.62..1,219,731.50 rows=53,426 width=52) (actual time=348.433..638.105 rows=300,979 loops=1)

  • Output: adin.net_cost, adin.target_impressions, adin.media_id, adin.brand_id, adin.target_id, adin.configuration_id, flrf_1.target_id, flrf_1.objective_id, (round(sum(flrf_1.cal_impact))), flrf_1.configuration_id
31. 0.069 20.997 ↑ 213.0 1 1

GroupAggregate (cost=8,159.16..8,174.64 rows=213 width=24) (actual time=20.997..20.997 rows=1 loops=1)

  • Output: flrf_1.brand_id, flrf_1.configuration_id, flrf_1.objective_id, flrf_1.target_id, round(sum(flrf_1.cal_impact))
  • Group Key: flrf_1.configuration_id, flrf_1.brand_id, flrf_1.target_id, flrf_1.objective_id
32. 0.125 20.928 ↑ 4.1 209 1

Sort (cost=8,159.16..8,161.30 rows=854 width=24) (actual time=20.887..20.928 rows=209 loops=1)

  • Output: flrf_1.brand_id, flrf_1.configuration_id, flrf_1.objective_id, flrf_1.target_id, flrf_1.cal_impact
  • Sort Key: flrf_1.brand_id, flrf_1.target_id, flrf_1.objective_id
  • Sort Method: quicksort Memory: 41kB
33. 0.221 20.803 ↑ 4.1 209 1

Hash Join (cost=7,697.60..8,117.58 rows=854 width=24) (actual time=20.556..20.803 rows=209 loops=1)

  • Output: flrf_1.brand_id, flrf_1.configuration_id, flrf_1.objective_id, flrf_1.target_id, flrf_1.cal_impact
  • Hash Cond: (flrf_1.media_group_id = mdm_mediagrouplist.media_group_id)
34. 0.103 0.103 ↑ 1.0 209 1

Index Scan using mna_flrf_ab62a495 on public.mna_flrf flrf_1 (cost=0.29..159.55 rows=216 width=28) (actual time=0.012..0.103 rows=209 loops=1)

  • Output: flrf_1.id, flrf_1.source, flrf_1.media_name, flrf_1.retention, flrf_1.control, flrf_1.low_sample, flrf_1.lift_cam, flrf_1.lift_type, flrf_1.lift_sat, flrf_1.lift_sat_apnyi, flrf_1.lift_cam_apnyi, flrf_1.freq_cam, flrf_1.freq_sat, flrf_1.coefficient_1, flrf_1.coefficient_2, flrf_1.max_x, flrf_1.max_y, flrf_1.flrf_fixedpoint, flrf_1.flrf_lift, flrf_1.model_run, flrf_1.objective_name, flrf_1.created_at, flrf_1.updated_at, flrf_1.brand_id, flrf_1.configuration_id, flrf_1.flrf_type_id, flrf_1.media_group_id, flrf_1.objective_id, flrf_1.target_id, flrf_1.cal_factor, flrf_1.cal_impact
  • Index Cond: (flrf_1.configuration_id = 1557)
35. 0.081 20.479 ↑ 44.6 209 1

Hash (cost=7,580.75..7,580.75 rows=9,325 width=8) (actual time=20.479..20.479 rows=209 loops=1)

  • Output: mdm_mediagrouplist.media_group_id, mdm_mediagrouplist.configuration_id
  • Buckets: 16384 Batches: 1 Memory Usage: 137kB
36. 3.916 20.398 ↑ 44.6 209 1

HashAggregate (cost=7,394.25..7,487.50 rows=9,325 width=8) (actual time=20.276..20.398 rows=209 loops=1)

  • Output: mdm_mediagrouplist.media_group_id, mdm_mediagrouplist.configuration_id
  • Group Key: mdm_mediagrouplist.media_group_id, mdm_mediagrouplist.configuration_id
37. 5.174 16.482 ↑ 1.0 10,056 1

Gather (cost=1,000.00..7,341.56 rows=10,538 width=8) (actual time=12.114..16.482 rows=10,056 loops=1)

  • Output: mdm_mediagrouplist.media_group_id, mdm_mediagrouplist.configuration_id
  • Workers Planned: 2
  • Workers Launched: 2
38. 11.308 11.308 ↑ 1.3 3,352 3

Parallel Seq Scan on public.mdm_mediagrouplist (cost=0.00..5,287.76 rows=4,391 width=8) (actual time=9.587..11.308 rows=3,352 loops=3)

  • Output: mdm_mediagrouplist.media_group_id, mdm_mediagrouplist.configuration_id
  • Filter: (mdm_mediagrouplist.configuration_id = 1557)
  • Rows Removed by Filter: 124250
  • Worker 0: actual time=8.582..10.522 rows=4560 loops=1
  • Worker 1: actual time=8.599..11.788 rows=5399 loops=1
39. 154.882 481.489 ↓ 684.0 300,979 1

Bitmap Heap Scan on public.mdm_adinsertion adin (cost=4,077.46..5,683.65 rows=440 width=32) (actual time=327.431..481.489 rows=300,979 loops=1)

  • Output: adin.net_cost, adin.target_impressions, adin.media_id, adin.brand_id, adin.target_id, adin.configuration_id
  • Recheck Cond: ((adin.configuration_id = flrf_1.configuration_id) AND (adin.brand_id = flrf_1.brand_id))
  • Heap Blocks: exact=6499
40. 0.172 326.607 ↓ 0.0 0 1

BitmapAnd (cost=4,077.46..4,077.46 rows=440 width=0) (actual time=326.607..326.607 rows=0 loops=1)

41. 12.246 12.246 ↓ 6.0 300,979 1

Bitmap Index Scan on mdm_adinsertion_ab62a495 (cost=0.00..1,056.56 rows=50,165 width=0) (actual time=12.246..12.246 rows=300,979 loops=1)

  • Index Cond: (adin.configuration_id = flrf_1.configuration_id)
42. 314.189 314.189 ↓ 39.3 7,292,751 1

Bitmap Index Scan on mdm_adinsertion_521b20f5 (cost=0.00..3,020.43 rows=185,699 width=0) (actual time=314.189..314.189 rows=7,292,751 loops=1)

  • Index Cond: (adin.brand_id = flrf_1.brand_id)
43. 601.958 601.958 ↑ 1.0 1 300,979

Index Scan using mdm_mediagrouplist_35bf24f6 on public.mdm_mediagrouplist mgl2 (cost=0.42..0.50 rows=1 width=12) (actual time=0.001..0.002 rows=1 loops=300,979)

  • Output: mgl2.id, mgl2.created_at, mgl2.updated_at, mgl2.media_id, mgl2.media_group_id, mgl2.configuration_id
  • Index Cond: (mgl2.media_id = adin.media_id)
  • Filter: (adin.configuration_id = mgl2.configuration_id)
  • Rows Removed by Filter: 0
44. 0.172 0.330 ↑ 25.1 19 1

Sort (cost=32.93..34.12 rows=476 width=8) (actual time=0.324..0.330 rows=19 loops=1)

  • Output: base_target.rif_target_id, base_target.id
  • Sort Key: base_target.id
  • Sort Method: quicksort Memory: 47kB
45. 0.158 0.158 ↓ 1.0 479 1

Seq Scan on public.mdm_target base_target (cost=0.00..11.76 rows=476 width=8) (actual time=0.011..0.158 rows=479 loops=1)

  • Output: base_target.rif_target_id, base_target.id
46. 20.112 150.840 ↑ 1.0 1 10,056

Bitmap Heap Scan on public.mna_flrf flrf (cost=4.96..8.98 rows=1 width=45) (actual time=0.015..0.015 rows=1 loops=10,056)

  • Output: flrf.id, flrf.source, flrf.media_name, flrf.retention, flrf.control, flrf.low_sample, flrf.lift_cam, flrf.lift_type, flrf.lift_sat, flrf.lift_sat_apnyi, flrf.lift_cam_apnyi, flrf.freq_cam, flrf.freq_sat, flrf.coefficient_1, flrf.coefficient_2, flrf.max_x, flrf.max_y, flrf.flrf_fixedpoint, flrf.flrf_lift, flrf.model_run, flrf.objective_name, flrf.created_at, flrf.updated_at, flrf.brand_id, flrf.configuration_id, flrf.flrf_type_id, flrf.media_group_id, flrf.objective_id, flrf.target_id, flrf.cal_factor, flrf.cal_impact
  • Recheck Cond: ((flrf.media_group_id = adins.media_group_id) AND (flrf.configuration_id = adins.configuration_id))
  • Filter: ((adins.brand_id = flrf.brand_id) AND (adins.objective_id = flrf.objective_id) AND (adins.opt_target_id = flrf.target_id))
  • Heap Blocks: exact=10056
47. 20.112 130.728 ↓ 0.0 0 10,056

BitmapAnd (cost=4.96..4.96 rows=1 width=0) (actual time=0.013..0.013 rows=0 loops=10,056)

48. 20.112 20.112 ↑ 5.6 5 10,056

Bitmap Index Scan on mna_flrf_92b669c7 (cost=0.00..2.09 rows=28 width=0) (actual time=0.002..0.002 rows=5 loops=10,056)

  • Index Cond: (flrf.media_group_id = adins.media_group_id)
49. 90.504 90.504 ↓ 2.3 209 10,056

Bitmap Index Scan on mna_flrf_ab62a495 (cost=0.00..2.62 rows=90 width=0) (actual time=0.009..0.009 rows=209 loops=10,056)

  • Index Cond: (flrf.configuration_id = adins.configuration_id)
50. 10.056 10.056 ↑ 1.0 1 10,056

Index Scan using mevo_configuration_pkey on public.mevo_configuration config (cost=0.28..0.30 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=10,056)

  • Output: config.id, config.name, config.notes, config.config_media_id, config.workpackage_id
  • Index Cond: (config.id = flrf.configuration_id)
51. 10.056 10.056 ↑ 1.0 1 10,056

Index Scan using erm_client_report_pkey on public.erm_client_report report (cost=0.28..0.38 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=10,056)

  • 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
  • Index Cond: (report.id = config.workpackage_id)
52. 10.056 10.056 ↑ 1.0 1 10,056

Index Scan using mdm_brand_pkey on public.mdm_brand brand (cost=0.28..0.29 rows=1 width=18) (actual time=0.001..0.001 rows=1 loops=10,056)

  • Output: brand.id, brand.name, brand.display_name, brand.logo, brand.description, brand.year_founded, brand.number_employees, brand.website, brand.ticker, brand.average_sales, brand.ceo_name, brand.headquarters, brand.created_at, brand.updated_at, brand.vertical_id
  • Index Cond: (brand.id = flrf.brand_id)
53. 30.168 30.168 ↑ 2.5 2 10,056

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

  • 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)
54. 20.112 20.112 ↑ 1.0 1 10,056

Index Scan using mdm_media_pkey on public.mdm_media (cost=0.43..0.83 rows=1 width=110) (actual time=0.002..0.002 rows=1 loops=10,056)

  • Output: mdm_media.id, mdm_media.name, mdm_media.short_name, mdm_media.geography_id, mdm_media.parent_id
  • Index Cond: (mdm_media.id = base_media_rfi.media_id)
55. 20.112 20.112 ↑ 1.0 1 10,056

Index Scan using mdm_target_pkey on public.mdm_target opt_target (cost=0.27..0.29 rows=1 width=28) (actual time=0.002..0.002 rows=1 loops=10,056)

  • Output: opt_target.id, opt_target.name, opt_target.description, opt_target.created_at, opt_target.updated_at, opt_target.short_name, opt_target.rif_target_id, opt_target.code
  • Index Cond: (opt_target.id = flrf.target_id)
56. 40.224 40.224 ↑ 2.5 2 10,056

Index Scan using mdm_mediarfi_35bf24f6 on public.mdm_media_rfi opt_media_rfi (cost=0.42..0.60 rows=5 width=16) (actual time=0.003..0.004 rows=2 loops=10,056)

  • 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 = mdm_media.id)
57. 331.848 331.848 ↑ 1.0 1 10,056

Index Scan using mdm_targetpopulation_55e2df16 on public.mdm_targetpopulation (cost=0.29..3.45 rows=1 width=12) (actual time=0.003..0.033 rows=1 loops=10,056)

  • Output: mdm_targetpopulation.id, mdm_targetpopulation.population, mdm_targetpopulation.created_at, mdm_targetpopulation.updated_at, mdm_targetpopulation.target_id, mdm_targetpopulation.geography_id
  • Index Cond: (mdm_targetpopulation.target_id = flrf.target_id)
  • Filter: (mdm_targetpopulation.geography_id = 1)
  • Rows Removed by Filter: 210
58. 30.168 30.168 ↑ 2.5 2 10,056

Index Scan using mdm_mediarfi_35bf24f6 on public.mdm_media_rfi a18_media_rfi (cost=0.42..0.60 rows=5 width=16) (actual time=0.002..0.003 rows=2 loops=10,056)

  • Output: a18_media_rfi.id, a18_media_rfi.r1, a18_media_rfi.r2, a18_media_rfi.r3, a18_media_rfi.r4, a18_media_rfi.r5, a18_media_rfi.r6, a18_media_rfi.r7, a18_media_rfi.r8, a18_media_rfi.f1, a18_media_rfi.f2, a18_media_rfi.f3, a18_media_rfi.f4, a18_media_rfi.f5, a18_media_rfi.f6, a18_media_rfi.f7, a18_media_rfi.f8, a18_media_rfi.i1, a18_media_rfi.i2, a18_media_rfi.i3, a18_media_rfi.i4, a18_media_rfi.i5, a18_media_rfi.i6, a18_media_rfi.i7, a18_media_rfi.i8, a18_media_rfi.created_at, a18_media_rfi.updated_at, a18_media_rfi.media_id, a18_media_rfi.target_id, a18_media_rfi.file_id
  • Index Cond: (a18_media_rfi.media_id = mdm_media.id)
59. 124.314 124.314 ↓ 0.0 0 20,719

Index Scan using mdm_target_139618a5 on public.mdm_target a18_target (cost=0.27..0.29 rows=1 width=4) (actual time=0.006..0.006 rows=0 loops=20,719)

  • Output: a18_target.id, a18_target.name, a18_target.description, a18_target.created_at, a18_target.updated_at, a18_target.short_name, a18_target.rif_target_id, a18_target.code
  • Index Cond: (a18_target.rif_target_id = a18_media_rfi.target_id)
  • Filter: (a18_target.id = 1)
  • Rows Removed by Filter: 23
60. 20.112 20.112 ↑ 1.0 1 10,056

Index Scan using mdm_mediagroup_pkey on public.mdm_mediagroup (cost=0.28..0.30 rows=1 width=21) (actual time=0.002..0.002 rows=1 loops=10,056)

  • Output: mdm_mediagroup.name, mdm_mediagroup.id
  • Index Cond: (mdm_mediagroup.id = flrf.media_group_id)
61. 703.920 703.920 ↓ 1.0 141 10,056

Index Scan using mdm_targetpopulation_bba4d9cf on public.mdm_targetpopulation media_opt_pop (cost=0.29..2.77 rows=139 width=16) (actual time=0.004..0.070 rows=141 loops=10,056)

  • Output: media_opt_pop.id, media_opt_pop.population, media_opt_pop.created_at, media_opt_pop.updated_at, media_opt_pop.target_id, media_opt_pop.geography_id
  • Index Cond: (media_opt_pop.geography_id = media_base_pop.geography_id)
62. 20.112 20.112 ↑ 1.0 1 10,056

Index Scan using mdm_media_pkey on public.mdm_media rollup (cost=0.43..0.66 rows=1 width=91) (actual time=0.002..0.002 rows=1 loops=10,056)

  • Output: rollup.id, rollup.name
  • Index Cond: (rollup.id = mdm_media.parent_id)