explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1QaB : Only Owner

Settings
# exclusive inclusive rows x rows loops node
1. 0.117 2,550.343 ↑ 1.0 5 1

Limit (cost=1,079,304.08..1,079,304.10 rows=5 width=1,172) (actual time=2,550.226..2,550.343 rows=5 loops=1)

  • Buffers: shared hit=3022535 read=323777, temp read=10725 written=10742
2. 208.694 2,550.226 ↑ 63,410.0 5 1

Sort (cost=1,079,304.08..1,080,096.71 rows=317,050 width=1,172) (actual time=2,550.225..2,550.226 rows=5 loops=1)

  • Sort Key: crypto_trades_completed.created_at DESC, crypto_trades_completed.id
  • Sort Method: top-N heapsort Memory: 27kB
  • Buffers: shared hit=3022535 read=323777, temp read=10725 written=10742
3. 90.864 2,341.532 ↑ 1.1 300,006 1

Nested Loop (cost=845,728.81..1,074,038.00 rows=317,050 width=1,172) (actual time=940.118..2,341.532 rows=300,006 loops=1)

  • Buffers: shared hit=3022535 read=323777, temp read=10725 written=10742
4. 0.010 0.010 ↑ 1.0 1 1

Index Scan using user_account_id_username_index on user_accounts o_acc (cost=0.43..8.45 rows=1 width=58) (actual time=0.009..0.010 rows=1 loops=1)

  • Index Cond: (id = '694882'::bigint)
  • Buffers: shared hit=4
5. 79.645 2,250.658 ↑ 1.1 300,006 1

Gather (cost=845,728.38..1,070,859.05 rows=317,050 width=1,106) (actual time=940.105..2,250.658 rows=300,006 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
  • Buffers: shared hit=3022531 read=323777, temp read=10725 written=10742
6. 41.642 2,171.013 ↑ 1.3 100,002 3 / 3

Hash Join (cost=844,728.38..1,038,154.05 rows=132,104 width=1,106) (actual time=917.546..2,171.013 rows=100,002 loops=3)

  • Hash Cond: (crypto_trades_completed.fiat_currency_id = fiat_currencies.id)
  • Buffers: shared hit=3022531 read=323777, temp read=10725 written=10742
7. 41.022 2,129.294 ↑ 1.3 100,002 3 / 3

Hash Join (cost=844,721.08..1,037,792.28 rows=132,104 width=1,102) (actual time=917.360..2,129.294 rows=100,002 loops=3)

  • Hash Cond: (crypto_trades_completed.payment_method_id = payment_methods.id)
  • Buffers: shared hit=3022439 read=323772, temp read=10725 written=10742
8. 43.971 2,086.172 ↑ 1.3 100,002 3 / 3

Hash Join (cost=844,459.20..1,037,183.20 rows=132,104 width=1,067) (actual time=915.218..2,086.172 rows=100,002 loops=3)

  • Hash Cond: (crypto_trades_completed.crypto_trade_status_id = crypto_trade_statuses.status_id)
  • Buffers: shared hit=3021864 read=323770, temp read=10725 written=10742
9. 315.606 2,042.184 ↑ 1.3 100,002 3 / 3

Merge Join (cost=844,457.93..1,035,365.50 rows=132,104 width=547) (actual time=915.186..2,042.184 rows=100,002 loops=3)

  • Merge Cond: (crypto_trades_completed.offer_responder_id = r_acc.id)
  • Buffers: shared hit=3021861 read=323770, temp read=10725 written=10742
10. 200.158 944.258 ↑ 1.3 100,002 3 / 3

Sort (cost=844,413.35..844,743.61 rows=132,104 width=497) (actual time=914.372..944.258 rows=100,002 loops=3)

  • Sort Key: crypto_trades_completed.offer_responder_id
  • Sort Method: external sort Disk: 18232kB
  • Buffers: shared hit=34 read=290302, temp read=10725 written=10742
11. 744.100 744.100 ↑ 1.3 100,002 3 / 3

Parallel Index Scan using crypto_trades_completed_offer_owner_id_index on crypto_trades_completed (cost=0.57..773,572.04 rows=132,104 width=497) (actual time=0.050..744.100 rows=100,002 loops=3)

  • Index Cond: (offer_owner_id = '694882'::bigint)
  • Buffers: shared hit=26 read=290302
12. 782.320 782.320 ↑ 1.0 3,150,412 3 / 3

Index Only Scan using user_accounts_id_username_avatarurl_idx on user_accounts r_acc (cost=0.56..181,091.82 rows=3,186,676 width=58) (actual time=0.039..782.320 rows=3,150,412 loops=3)

  • Heap Fetches: 548
  • Buffers: shared hit=3021827 read=33468
13. 0.005 0.017 ↑ 1.0 12 3 / 3

Hash (cost=1.12..1.12 rows=12 width=520) (actual time=0.017..0.017 rows=12 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=3
14. 0.012 0.012 ↑ 1.0 12 3 / 3

Seq Scan on crypto_trade_statuses (cost=0.00..1.12 rows=12 width=520) (actual time=0.010..0.012 rows=12 loops=3)

  • Buffers: shared hit=3
15. 1.005 2.100 ↑ 1.0 3,506 3 / 3

Hash (cost=218.06..218.06 rows=3,506 width=47) (actual time=2.100..2.100 rows=3,506 loops=3)

  • Buckets: 4096 Batches: 1 Memory Usage: 316kB
  • Buffers: shared hit=549
16. 1.095 1.095 ↑ 1.0 3,506 3 / 3

Seq Scan on payment_methods (cost=0.00..218.06 rows=3,506 width=47) (actual time=0.011..1.095 rows=3,506 loops=3)

  • Buffers: shared hit=549
17. 0.033 0.077 ↑ 1.0 191 3 / 3

Hash (cost=4.91..4.91 rows=191 width=8) (actual time=0.077..0.077 rows=191 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 16kB
  • Buffers: shared hit=9
18. 0.044 0.044 ↑ 1.0 191 3 / 3

Seq Scan on fiat_currencies (cost=0.00..4.91 rows=191 width=8) (actual time=0.014..0.044 rows=191 loops=3)

  • Buffers: shared hit=9
Planning time : 2.219 ms
Execution time : 2,553.608 ms