explain.depesz.com

PostgreSQL's explain analyze made readable

Result: HvFR

Settings
# exclusive inclusive rows x rows loops node
1. 1.323 16.317 ↓ 3.1 3,233 1

WindowAgg (cost=11,131.34..11,177.73 rows=1,031 width=105) (actual time=14.695..16.317 rows=3,233 loops=1)

2. 1.879 14.994 ↓ 3.1 3,233 1

Sort (cost=11,131.34..11,133.92 rows=1,031 width=102) (actual time=14.685..14.994 rows=3,233 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: 551kB
3. 4.370 13.115 ↓ 3.1 3,233 1

Hash Join (cost=10,817.82..11,079.74 rows=1,031 width=102) (actual time=7.709..13.115 rows=3,233 loops=1)

  • Hash Cond: ((new_avia_prices.pair_hash)::text = (m.pair_hash)::text)
4. 3.519 5.498 ↑ 2.1 3,233 1

HashAggregate (cost=3,930.18..3,998.62 rows=6,844 width=37) (actual time=4.439..5.498 rows=3,233 loops=1)

  • Group Key: new_avia_prices.pair_hash
5. 1.031 1.979 ↓ 1.0 8,600 1

Bitmap Heap Scan on new_avia_prices (cost=754.64..3,887.45 rows=8,545 width=37) (actual time=0.974..1.979 rows=8,600 loops=1)

  • Recheck Cond: ((request_hash)::text = 'avia:1555804800000:1557532800000:3:5024:4312:1:0:0'::text)
  • Heap Blocks: exact=216
6. 0.948 0.948 ↓ 1.0 8,600 1

Bitmap Index Scan on new_avia_prices_unq (cost=0.00..752.50 rows=8,545 width=0) (actual time=0.948..0.948 rows=8,600 loops=1)

  • Index Cond: ((request_hash)::text = 'avia:1555804800000:1557532800000:3:5024:4312:1:0:0'::text)
7. 0.755 3.247 ↑ 1.0 3,233 1

Hash (cost=6,846.92..6,846.92 rows=3,258 width=82) (actual time=3.247..3.247 rows=3,233 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 399kB
8. 2.083 2.492 ↑ 1.0 3,233 1

Bitmap Heap Scan on new_avia_models m (cost=221.66..6,846.92 rows=3,258 width=82) (actual time=0.489..2.492 rows=3,233 loops=1)

  • Recheck Cond: ((request_hash)::text = 'avia:1555804800000:1557532800000:3:5024:4312:1:0:0'::text)
  • Heap Blocks: exact=647
9. 0.409 0.409 ↑ 1.0 3,233 1

Bitmap Index Scan on avia_pair_hash_unq (cost=0.00..220.85 rows=3,258 width=0) (actual time=0.409..0.409 rows=3,233 loops=1)

  • Index Cond: ((request_hash)::text = 'avia:1555804800000:1557532800000:3:5024:4312:1:0:0'::text)