explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fZwm

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

Unique (cost=28,179,145.18..33,517,178.50 rows=44,483,611 width=695) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Sort (cost=28,179,145.18..28,290,354.21 rows=44,483,611 width=695) (actual rows= loops=)

  • Sort Key: bookings_plus_breaks.id, bookings_plus_breaks.breakdate, bookings_plus_breaks.breakweek, (lower((bookings_plus_breaks.channel)::text)), bookings_plus_breaks.starttime, bookings_plus_breaks.length, bookings_plus_breaks."position", bookings (...)
3. 0.000 0.000 ↓ 0.0

Merge Right Join (cost=1,816,332.77..6,498,479.39 rows=44,483,611 width=695) (actual rows= loops=)

  • Merge Cond: ((lower((programs_syn_after.programme_name)::text)) = (lower((bookings_plus_breaks.programmeafter)::text)))
4. 0.000 0.000 ↓ 0.0

Sort (cost=142.78..147.68 rows=1,960 width=47) (actual rows= loops=)

  • Sort Key: (lower((programs_syn_after.programme_name)::text))
5. 0.000 0.000 ↓ 0.0

Seq Scan on programs_syn programs_syn_after (cost=0.00..35.60 rows=1,960 width=47) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Materialize (cost=1,816,189.99..1,838,885.71 rows=4,539,144 width=418) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Sort (cost=1,816,189.99..1,827,537.85 rows=4,539,144 width=418) (actual rows= loops=)

  • Sort Key: (lower((bookings_plus_breaks.programmeafter)::text))
8. 0.000 0.000 ↓ 0.0

Merge Right Join (cost=713,454.92..805,415.35 rows=4,539,144 width=418) (actual rows= loops=)

  • Merge Cond: ((lower((programs_syn_before.programme_name)::text)) = (lower((bookings_plus_breaks.programmebefore)::text)))
9. 0.000 0.000 ↓ 0.0

Sort (cost=142.78..147.68 rows=1,960 width=47) (actual rows= loops=)

  • Sort Key: (lower((programs_syn_before.programme_name)::text))
10. 0.000 0.000 ↓ 0.0

Seq Scan on programs_syn programs_syn_before (cost=0.00..35.60 rows=1,960 width=47) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Materialize (cost=713,312.14..715,628.03 rows=463,178 width=396) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Sort (cost=713,312.14..714,470.09 rows=463,178 width=396) (actual rows= loops=)

  • Sort Key: (lower((bookings_plus_breaks.programmebefore)::text))
13. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=600,105.55..620,577.60 rows=463,178 width=396) (actual rows= loops=)

  • Hash Cond: (CASE WHEN (advertisers_syn."Synonym" IS NULL) THEN lower((advertisers.advertiser_name)::text) ELSE lower((advertisers_syn."Synonym")::text) END = v_advertisers_and_holdings.advertiser_name)
14. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=600,070.12..613,015.53 rows=463,178 width=374) (actual rows= loops=)

  • Merge Cond: (((CASE WHEN (agencies_syn."Synonym" IS NULL) THEN lower((agencies.agency_name)::text) ELSE lower((agencies_syn."Synonym")::text) END) = (lower((agency_holding.agency_name)::text))) AND (( (...)
15. 0.000 0.000 ↓ 0.0

Sort (cost=600,039.01..601,196.95 rows=463,178 width=353) (actual rows= loops=)

  • Sort Key: (CASE WHEN (agencies_syn."Synonym" IS NULL) THEN lower((agencies.agency_name)::text) ELSE lower((agencies_syn."Synonym")::text) END), (((date_part('year'::text, (bookings_plus_breaks.f (...)
16. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=4,206.12..511,941.56 rows=463,178 width=353) (actual rows= loops=)

  • Hash Cond: (bookings_plus_breaks.agency_id_fk = agencies_syn.agencies_id)
17. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=4,192.35..505,559.10 rows=463,178 width=334) (actual rows= loops=)

  • Hash Cond: (bookings_plus_breaks.agency_id_fk = agencies.agencies_id)
18. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=4,175.95..499,174.00 rows=463,178 width=312) (actual rows= loops=)

  • Hash Cond: (bookings_plus_breaks.advertiser_id_fk = advertisers_syn.advertiser_id)
19. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=4,008.45..492,637.80 rows=463,178 width=294) (actual rows= loops=)

  • Hash Cond: (bookings_plus_breaks.advertiser_id_fk = advertisers.advertiser_id)
20. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on bookings_plus_breaks (cost=3,830.21..486,090.87 rows=463,178 width=274) (actual rows= loops=)

  • Recheck Cond: ((((ordercategory)::text <> 'Testkampagne'::text) OR (ordercategory IS NULL)) AND (date_part('year'::text, (filedaten)::timestamp without time zone) = (...)
21. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on bpb_filedaten_idx_4_btree_2020 (cost=0.00..3,714.42 rows=463,178 width=0) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Hash (cost=102.55..102.55 rows=6,055 width=24) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Seq Scan on advertisers (cost=0.00..102.55 rows=6,055 width=24) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

Hash (cost=97.78..97.78 rows=5,578 width=26) (actual rows= loops=)

25. 0.000 0.000 ↓ 0.0

Seq Scan on advertisers_syn (cost=0.00..97.78 rows=5,578 width=26) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Hash (cost=9.51..9.51 rows=551 width=26) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

Seq Scan on agencies (cost=0.00..9.51 rows=551 width=26) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Hash (cost=8.34..8.34 rows=434 width=27) (actual rows= loops=)

29. 0.000 0.000 ↓ 0.0

Seq Scan on agencies_syn (cost=0.00..8.34 rows=434 width=27) (actual rows= loops=)

30. 0.000 0.000 ↓ 0.0

Sort (cost=31.11..32.31 rows=479 width=45) (actual rows= loops=)

  • Sort Key: (lower((agency_holding.agency_name)::text)), ((agency_holding.year)::double precision)
31. 0.000 0.000 ↓ 0.0

Seq Scan on agency_holding (cost=0.00..9.79 rows=479 width=45) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

Hash (cost=21.30..21.30 rows=1,130 width=44) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

Seq Scan on v_advertisers_and_holdings (cost=0.00..21.30 rows=1,130 width=44) (actual rows= loops=)