explain.depesz.com

PostgreSQL's explain analyze made readable

Result: kGcR

Settings
# exclusive inclusive rows x rows loops node
1. 653.504 36,273.302 ↓ 3.2 869,358 1

Unique (cost=695,247.52..697,295.68 rows=273,088 width=778) (actual time=35,353.448..36,273.302 rows=869,358 loops=1)

2. 22,705.311 35,619.798 ↓ 3.2 870,317 1

Sort (cost=695,247.52..695,930.24 rows=273,088 width=778) (actual time=35,353.445..35,619.798 rows=870,317 loops=1)

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

Hash Join (cost=612,434.60..670,589.03 rows=273,088 width=778) (actual time=10,387.831..12,914.487 rows=870,317 loops=1)

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

Hash Join (cost=612,315.56..664,290.31 rows=273,088 width=469) (actual time=10,385.918..10,969.554 rows=870,330 loops=1)

  • Hash Cond: (f.flight_group_key = p.flight_group_key)
5. 40.134 40.134 ↑ 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.019..40.134 rows=8,305 loops=1)

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

Hash (cost=537,226.10..537,226.10 rows=6,007,123 width=270) (actual time=10,346.692..10,346.692 rows=6,007,688 loops=1)

  • Buckets: 8388608 Batches: 1 Memory Usage: 1860803kB
7. 6,001.022 6,001.022 ↓ 1.0 6,007,688 1

Seq Scan on prices_1000 p (cost=0.00..537,226.10 rows=6,007,123 width=270) (actual time=0.022..6,001.022 rows=6,007,688 loops=1)

  • Filter: (price_current > 0)
8. 1.005 1.887 ↑ 1.0 2,846 1

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

  • Buckets: 4096 Batches: 1 Memory Usage: 363kB
9. 0.882 0.882 ↑ 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.882 rows=2,846 loops=1)