explain.depesz.com

PostgreSQL's explain analyze made readable

Result: VqZx

Settings
# exclusive inclusive rows x rows loops node
1. 587.613 1,455.686 ↑ 148,861.5 2 1

Merge Join (cost=140,757.09..292,451.74 rows=297,723 width=104) (actual time=1,455.674..1,455.686 rows=2 loops=1)

  • Merge Cond: (t.ticket_no = tf.ticket_no)
2. 528.206 528.206 ↑ 2.2 1,336,684 1

Index Scan using tickets_pkey on tickets t (cost=0.43..139,110.29 rows=2,949,857 width=104) (actual time=0.006..528.206 rows=1,336,684 loops=1)

3. 0.006 339.867 ↑ 148,861.5 2 1

Materialize (cost=140,756.66..142,245.27 rows=297,723 width=14) (actual time=339.864..339.867 rows=2 loops=1)

4. 0.025 339.861 ↑ 148,861.5 2 1

Sort (cost=140,756.66..141,500.97 rows=297,723 width=14) (actual time=339.859..339.861 rows=2 loops=1)

  • Sort Key: tf.ticket_no
  • Sort Method: quicksort Memory: 25kB
5. 115.234 339.836 ↑ 148,861.5 2 1

Hash Join (cost=4,616.07..108,599.26 rows=297,723 width=14) (actual time=80.178..339.836 rows=2 loops=1)

  • Hash Cond: (tf.flight_id = f.flight_id)
6. 224.579 224.579 ↑ 1.0 859,656 1

Index Scan using idx_fare_conditions_bussines on ticket_flights tf (cost=0.42..101,639.00 rows=893,173 width=18) (actual time=0.047..224.579 rows=859,656 loops=1)

7. 0.005 0.023 ↑ 71,622.0 1 1

Hash (cost=3,720.37..3,720.37 rows=71,622 width=4) (actual time=0.023..0.023 rows=1 loops=1)

  • Buckets: 131072 Batches: 1 Memory Usage: 1025kB
8. 0.004 0.018 ↑ 71,622.0 1 1

Bitmap Heap Scan on flights f (cost=22.04..3,720.37 rows=71,622 width=4) (actual time=0.018..0.018 rows=1 loops=1)

  • Recheck Cond: ((actual_departure - scheduled_departure) > '05:00:00'::interval)
  • Heap Blocks: exact=1
9. 0.014 0.014 ↑ 71,622.0 1 1

Bitmap Index Scan on idx_departure_interval (cost=0.00..4.13 rows=71,622 width=0) (actual time=0.014..0.014 rows=1 loops=1)

Planning time : 1.004 ms
Execution time : 1,455.868 ms