explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cNmo

Settings
# exclusive inclusive rows x rows loops node
1. 645.266 35,845.484 ↓ 3.2 869,358 1

Unique (cost=680,238.75..682,287.10 rows=273,114 width=778) (actual time=34,937.278..35,845.484 rows=869,358 loops=1)

2. 22,487.423 35,200.218 ↓ 3.2 870,317 1

Sort (cost=680,238.75..680,921.53 rows=273,114 width=778) (actual time=34,937.275..35,200.218 rows=870,317 loops=1)

  • Sort Key: p.price_key, f.flight_key
  • Sort Method: quicksort Memory: 908492kB
3. 1,940.888 12,712.795 ↓ 3.2 870,317 1

Hash Join (cost=597,422.44..655,577.72 rows=273,114 width=778) (actual time=10,186.381..12,712.795 rows=870,317 loops=1)

  • Hash Cond: (p.ap_id = l.ap_id)
4. 584.085 10,769.912 ↓ 3.2 870,330 1

Hash Join (cost=597,303.41..649,278.42 rows=273,114 width=469) (actual time=10,184.326..10,769.912 rows=870,330 loops=1)

  • Hash Cond: (f.flight_group_key = p.flight_group_key)
5. 39.996 39.996 ↑ 1.0 8,305 1

Index Scan using ix_flightsall_test_sst on flights_all_test f (cost=0.42..34,590.05 rows=8,350 width=225) (actual time=0.021..39.996 rows=8,305 loops=1)

  • Index Cond: (d3pf = false)
  • Filter: ((NOT d3pf) AND (seats >= 5))
  • Rows Removed by Filter: 2738
6. 4,306.182 10,145.831 ↑ 1.0 6,007,688 1

Hash (cost=522,206.88..522,206.88 rows=6,007,688 width=270) (actual time=10,145.831..10,145.831 rows=6,007,688 loops=1)

  • Buckets: 8388608 Batches: 1 Memory Usage: 1860803kB
7. 5,839.649 5,839.649 ↑ 1.0 6,007,688 1

Seq Scan on prices_1000 p (cost=0.00..522,206.88 rows=6,007,688 width=270) (actual time=0.006..5,839.649 rows=6,007,688 loops=1)

8. 1.096 1.995 ↑ 1.0 2,846 1

Hash (cost=83.46..83.46 rows=2,846 width=85) (actual time=1.995..1.995 rows=2,846 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 363kB
9. 0.899 0.899 ↑ 1.0 2,846 1

Seq Scan on locations l (cost=0.00..83.46 rows=2,846 width=85) (actual time=0.006..0.899 rows=2,846 loops=1)

Planning time : 1.670 ms