explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4LJM

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.094 ↓ 0.0 0 1

Limit (cost=27,731.44..27,731.44 rows=1 width=8) (actual time=0.094..0.094 rows=0 loops=1)

  • Buffers: shared hit=10
2. 0.057 0.057 ↑ 1.0 1 1

Buffers: shared hit=6 read=8Limit (cost=17,797.16..17,797.16 rows=1 width=8) (actual time=0.056..0.057 rows=1 loops=1)

3. 0.015 0.055 ↑ 6,997.0 1 1

Sort (cost=17,797.16..17,814.65 rows=6,997 width=8) (actual time=0.055..0.055 rows=1 loops=1)

  • Sort Key: crypto_trades_completed.trade_started_at
  • Sort Method: top-N heapsort Memory: 25kB
  • Buffers: shared hit=10
4. 0.001 0.040 ↑ 1,399.4 5 1

Append (cost=0.57..17,762.17 rows=6,997 width=8) (actual time=0.035..0.040 rows=5 loops=1)

  • Buffers: shared hit=10
5. 0.014 0.014 ↓ 0.0 0 1

Index Scan using crypto_trades_completed_offer_owner_id_index on crypto_trades_completed (cost=0.57..15,723.15 rows=6,228 width=8) (actual time=0.014..0.014 rows=0 loops=1)

  • Index Cond: (offer_owner_id = 3108854)
  • Buffers: shared hit=4
6. 0.025 0.025 ↑ 153.8 5 1

Index Scan using crypto_trades_completed_offer_responder_id_index on crypto_trades_completed crypto_trades_completed_1 (cost=0.57..1,969.05 rows=769 width=8) (actual time=0.020..0.025 rows=5 loops=1)

  • Index Cond: (offer_responder_id = 3108847)
  • Buffers: shared hit=6
7. 0.023 0.093 ↓ 0.0 0 1

Sort (cost=27,731.44..27,748.93 rows=6,997 width=8) (actual time=0.093..0.093 rows=0 loops=1)

  • Sort Key: trade_started_at
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=6 read=8
8. 0.002 0.070 ↓ 0.0 0 1

Bitmap Heap Scan on crypto_trades_completed (cost=141.11..27,696.45 rows=6,997 width=8) (actual time=0.070..0.070 rows=0 loops=1)

  • Recheck Cond: ((offer_owner_id = 123) OR (offer_responder_id = 456))
  • Buffers: shared hit=3 read=8
9. 0.001 0.068 ↓ 0.0 0 1

BitmapOr (cost=141.11..141.11 rows=6,997 width=0) (actual time=0.068..0.068 rows=0 loops=1)

  • Buffers: shared hit=3 read=8
10. 0.039 0.039 ↓ 0.0 0 1

Bitmap Index Scan on crypto_trades_completed_offer_owner_id_index (cost=0.00..119.28 rows=6,228 width=0) (actual time=0.039..0.039 rows=0 loops=1)

  • Index Cond: (offer_owner_id = 123)
  • Buffers: shared hit=3 read=4
11. 0.028 0.028 ↓ 0.0 0 1

Bitmap Index Scan on crypto_trades_completed_offer_responder_id_index (cost=0.00..18.33 rows=769 width=0) (actual time=0.028..0.028 rows=0 loops=1)

  • Index Cond: (offer_responder_id = 456)
  • Buffers: shared read=4
Planning time : 1.706 ms
Execution time : 0.135 ms