explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1jqu

Settings
# exclusive inclusive rows x rows loops node
1. 5.211 115.056 ↓ 1.1 3,031 1

Gather (cost=25,285.88..429,789.00 rows=2,716 width=383) (actual time=1.435..115.056 rows=3,031 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
2. 4.421 12.853 ↑ 1.1 1,516 2 / 2

Nested Loop (cost=24,285.88..46,316.55 rows=1,598 width=351) (actual time=0.521..12.853 rows=1,516 loops=2)

3. 2.030 2.370 ↑ 1.1 1,516 2 / 2

Parallel Bitmap Heap Scan on crypto_trades_active (cost=24,285.46..33,749.20 rows=1,598 width=77) (actual time=0.501..2.370 rows=1,516 loops=2)

  • Recheck Cond: (crypto_trade_status_id = 10)
  • Heap Blocks: exact=21
4. 0.340 0.340 ↓ 1.1 3,031 1 / 2

Bitmap Index Scan on crypto_trades_active_crypto_trade_status_id_index (cost=0.00..24,284.78 rows=2,716 width=0) (actual time=0.680..0.680 rows=3,031 loops=1)

  • Index Cond: (crypto_trade_status_id = 10)
5. 6.062 6.062 ↑ 1.0 1 3,031 / 2

Index Scan using crypto_trades_disputed_crypto_trade_id_index on crypto_trades_disputed (cost=0.43..7.85 rows=1 width=274) (actual time=0.004..0.004 rows=1 loops=3,031)

  • Index Cond: (crypto_trade_id = crypto_trades_active.id)
6.          

SubPlan (for Gather)

7. 6.062 24.248 ↑ 1.0 1 3,031

Aggregate (cost=78.03..78.04 rows=1 width=8) (actual time=0.008..0.008 rows=1 loops=3,031)

8. 18.186 18.186 ↑ 21.0 6 3,031

Index Only Scan using crypto_trades_disputed_dispute_started_by_idx on crypto_trades_disputed crypto_trades_disputed_1 (cost=0.43..77.72 rows=126 width=0) (actual time=0.003..0.006 rows=6 loops=3,031)

  • Index Cond: (dispute_started_by = crypto_trades_active.buyer_id)
  • Heap Fetches: 4,900
9. 3.031 9.093 ↑ 1.0 1 3,031

Aggregate (cost=8.44..8.45 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=3,031)

10. 6.062 6.062 ↓ 0.0 0 3,031

Index Only Scan using crypto_trade_notes_trade_id_index on crypto_trade_notes (cost=0.42..8.44 rows=1 width=0) (actual time=0.002..0.002 rows=0 loops=3,031)

  • Index Cond: (trade_id = crypto_trades_disputed.crypto_trade_id)
  • Heap Fetches: 157
11. 0.000 9.093 ↓ 0.0 0 3,031

Limit (cost=8.45..8.45 rows=1 width=12) (actual time=0.003..0.003 rows=0 loops=3,031)

12. 3.031 9.093 ↓ 0.0 0 3,031

Sort (cost=8.45..8.45 rows=1 width=12) (actual time=0.003..0.003 rows=0 loops=3,031)

  • Sort Key: crypto_trade_notes_1.id DESC
  • Sort Method: quicksort Memory: 25kB
13. 6.062 6.062 ↓ 0.0 0 3,031

Index Scan using crypto_trade_notes_trade_id_index on crypto_trade_notes crypto_trade_notes_1 (cost=0.42..8.44 rows=1 width=12) (actual time=0.002..0.002 rows=0 loops=3,031)

  • Index Cond: (trade_id = crypto_trades_disputed.crypto_trade_id)
14. 6.062 27.279 ↑ 1.0 1 3,031

Aggregate (cost=9.15..9.16 rows=1 width=8) (actual time=0.009..0.009 rows=1 loops=3,031)

15. 21.217 21.217 ↑ 7.2 4 3,031

Index Only Scan using crypto_trades_details_trade_id_index on crypto_trades_details (cost=0.57..9.08 rows=29 width=0) (actual time=0.004..0.007 rows=4 loops=3,031)

  • Index Cond: (trade_id = crypto_trades_disputed.crypto_trade_id)
  • Heap Fetches: 11,449
16. 3.031 27.279 ↑ 1.0 1 3,031

Limit (cost=36.62..36.62 rows=1 width=12) (actual time=0.009..0.009 rows=1 loops=3,031)

17. 6.062 24.248 ↑ 29.0 1 3,031

Sort (cost=36.62..36.69 rows=29 width=12) (actual time=0.008..0.008 rows=1 loops=3,031)

  • Sort Key: crypto_trades_details_1.id DESC
  • Sort Method: top-N heapsort Memory: 25kB
18. 18.186 18.186 ↑ 7.2 4 3,031

Index Scan using crypto_trades_details_trade_id_index on crypto_trades_details crypto_trades_details_1 (cost=0.57..36.47 rows=29 width=12) (actual time=0.003..0.006 rows=4 loops=3,031)

  • Index Cond: (trade_id = crypto_trades_disputed.crypto_trade_id)
Planning time : 0.463 ms
Execution time : 115.961 ms