explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4gti

Settings
# exclusive inclusive rows x rows loops node
1. 97.704 3,173.516 ↓ 42.7 26,103 1

Hash Left Join (cost=149.73..7,550.24 rows=612 width=28) (actual time=17.569..3,173.516 rows=26,103 loops=1)

  • Hash Cond: ((ig.title_id = dos.title_id) AND (ig.country_id = dos.country_id))
  • Filter: (COALESCE(dos.distributor_id, ig.distributor_id) = 'BUENA2'::text)
  • Rows Removed by Filter: 196020
2. 49.810 3,075.786 ↓ 1.8 222,123 1

Nested Loop (cost=148.48..6,906.57 rows=122,358 width=35) (actual time=5.041..3,075.786 rows=222,123 loops=1)

3. 8.412 9.264 ↓ 27.1 5,416 1

HashAggregate (cost=148.05..150.05 rows=200 width=8) (actual time=3.861..9.264 rows=5,416 loops=1)

  • Group Key: theaters_temp_table.theater_id
4. 0.852 0.852 ↓ 3.1 5,416 1

Seq Scan on theaters_temp_table (cost=0.00..143.64 rows=1,764 width=8) (actual time=0.011..0.852 rows=5,416 loops=1)

5. 32.496 3,016.712 ↑ 1.2 41 5,416

Append (cost=0.43..33.30 rows=48 width=35) (actual time=0.095..0.557 rows=41 loops=5,416)

6. 2,984.216 2,984.216 ↑ 1.2 41 5,416

Index Scan using ix_iboe_grosses_theater_id_20180101 on iboe_grosses_test_20180101 ig (cost=0.43..33.30 rows=48 width=35) (actual time=0.094..0.551 rows=41 loops=5,416)

  • Index Cond: (theater_id = theaters_temp_table.theater_id)
  • Filter: ((booking_date >= '2018-01-15'::date) AND (booking_date <= '2018-01-21'::date))
  • Rows Removed by Filter: 137
7. 0.008 0.026 ↑ 1.0 10 1

Hash (cost=1.10..1.10 rows=10 width=72) (actual time=0.026..0.026 rows=10 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
8. 0.018 0.018 ↑ 1.0 10 1

Seq Scan on distributors_overrides dos (cost=0.00..1.10 rows=10 width=72) (actual time=0.015..0.018 rows=10 loops=1)

Planning time : 261.782 ms
Execution time : 3,210.170 ms