explain.depesz.com

PostgreSQL's explain analyze made readable

Result: vMi3

Settings
# exclusive inclusive rows x rows loops node
1. 1.108 14,874.891 ↓ 3,213.0 3,213 1

WindowAgg (cost=16.25..16.30 rows=1 width=105) (actual time=14,873.565..14,874.891 rows=3,213 loops=1)

2. 6.439 14,873.783 ↓ 3,213.0 3,213 1

Sort (cost=16.25..16.26 rows=1 width=102) (actual time=14,873.555..14,873.783 rows=3,213 loops=1)

  • Sort Key: ((((min(new_avia_prices.price)))::numeric * (((m.flight_duration + m.flight_duration_b))::numeric + (((m.changes_duration + m.changes_duration_b))::numeric * 1.5))))
  • Sort Method: quicksort Memory: 548kB
3. 915.939 14,867.344 ↓ 3,213.0 3,213 1

Nested Loop (cost=0.83..16.24 rows=1 width=102) (actual time=0.082..14,867.344 rows=3,213 loops=1)

  • Join Filter: ((m.pair_hash)::text = (new_avia_prices.pair_hash)::text)
  • Rows Removed by Join Filter: 10320156
4. 6.985 6.985 ↓ 3,213.0 3,213 1

Index Scan using avia_pair_hash_unq on new_avia_models m (cost=0.41..8.08 rows=1 width=82) (actual time=0.035..6.985 rows=3,213 loops=1)

  • Index Cond: ((request_hash)::text = 'avia:1555804800000:1557532800000:3:5024:4312:2:1:0'::text)
5. 5,340.006 13,944.420 ↓ 3,213.0 3,213 3,213

GroupAggregate (cost=0.42..8.12 rows=1 width=37) (actual time=0.016..4.340 rows=3,213 loops=3,213)

  • Group Key: new_avia_prices.pair_hash
6. 8,604.414 8,604.414 ↓ 8,358.0 8,358 3,213

Index Scan using new_avia_prices_unq on new_avia_prices (cost=0.42..8.10 rows=1 width=37) (actual time=0.013..2.678 rows=8,358 loops=3,213)

  • Index Cond: ((request_hash)::text = 'avia:1555804800000:1557532800000:3:5024:4312:2:1:0'::text)
Planning time : 0.240 ms
Execution time : 14,875.064 ms