explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wBsl

Settings
# exclusive inclusive rows x rows loops node
1. 46.272 1,087.907 ↓ 1.1 9,385 1

Nested Loop (cost=4,857.41..34,645.10 rows=8,884 width=104) (actual time=29.626..1,087.907 rows=9,385 loops=1)

  • Buffers: shared hit=40,995
2. 413.647 844.550 ↓ 1.1 9,385 1

Hash Join (cost=4,856.98..28,242.21 rows=8,884 width=14) (actual time=29.564..844.550 rows=9,385 loops=1)

  • Hash Cond: (tf.flight_id = f.flight_id)
  • Buffers: shared hit=3,455
3. 401.804 419.979 ↑ 1.0 242,204 1

Bitmap Heap Scan on ticket_flights tf (cost=3,944.85..26,685.25 rows=245,632 width=18) (actual time=18.552..419.979 rows=242,204 loops=1)

  • Recheck Cond: ((fare_conditions)::text = 'Business'::text)
  • Heap Blocks: exact=2,023
  • Buffers: shared hit=2,687
4. 18.175 18.175 ↑ 1.0 242,204 1

Bitmap Index Scan on ticket_flights_flight_id_idx (cost=0.00..3,883.44 rows=245,632 width=0) (actual time=18.173..18.175 rows=242,204 loops=1)

  • Buffers: shared hit=664
5. 3.537 10.924 ↓ 1.0 2,397 1

Hash (cost=882.45..882.45 rows=2,375 width=4) (actual time=10.923..10.924 rows=2,397 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 117kB
  • Buffers: shared hit=768
6. 7.008 7.387 ↓ 1.0 2,397 1

Bitmap Heap Scan on flights f (cost=54.82..882.45 rows=2,375 width=4) (actual time=0.482..7.387 rows=2,397 loops=1)

  • Recheck Cond: ((actual_departure - scheduled_departure) > '02:00:00'::interval)
  • Heap Blocks: exact=756
  • Buffers: shared hit=768
7. 0.379 0.379 ↓ 1.0 2,397 1

Bitmap Index Scan on flights_expr_idx (cost=0.00..54.23 rows=2,375 width=0) (actual time=0.377..0.379 rows=2,397 loops=1)

  • Index Cond: ((actual_departure - scheduled_departure) > '02:00:00'::interval)
  • Buffers: shared hit=12
8. 197.085 197.085 ↑ 1.0 1 9,385

Index Scan using tickets_pkey on tickets t (cost=0.42..0.72 rows=1 width=104) (actual time=0.021..0.021 rows=1 loops=9,385)

  • Index Cond: (ticket_no = tf.ticket_no)
  • Buffers: shared hit=37,540
Planning time : 0.761 ms
Execution time : 1,105.801 ms