explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mbOC

Settings
# exclusive inclusive rows x rows loops node
1. 48.317 125.563 ↓ 1.0 3,112 1

Gather (cost=26,531.40..435,986.90 rows=3,039 width=461) (actual time=2.187..125.563 rows=3,112 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
2. 2.109 33.678 ↑ 1.1 1,556 2 / 2

Nested Loop (cost=25,531.40..91,920.47 rows=1,788 width=429) (actual time=0.905..33.678 rows=1,556 loops=2)

3. 1.773 26.901 ↑ 1.1 1,556 2 / 2

Nested Loop (cost=25,530.96..84,067.41 rows=1,788 width=416) (actual time=0.892..26.901 rows=1,556 loops=2)

4. 1.081 20.460 ↑ 1.1 1,556 2 / 2

Nested Loop Left Join (cost=25,530.53..76,214.36 rows=1,788 width=403) (actual time=0.874..20.460 rows=1,556 loops=2)

5. 1.152 17.823 ↑ 1.1 1,556 2 / 2

Hash Join (cost=25,530.10..68,614.17 rows=1,788 width=389) (actual time=0.865..17.823 rows=1,556 loops=2)

  • Hash Cond: (crypto_trades_active.fiat_currency_id = fiat_currencies.id)
6. 2.172 16.327 ↑ 1.1 1,556 2 / 2

Nested Loop (cost=25,158.80..68,238.08 rows=1,788 width=389) (actual time=0.482..16.327 rows=1,556 loops=2)

7. 2.967 9.487 ↑ 1.1 1,556 2 / 2

Nested Loop (cost=25,152.39..49,599.14 rows=1,788 width=374) (actual time=0.460..9.487 rows=1,556 loops=2)

8. 1.535 1.852 ↑ 1.1 1,556 2 / 2

Parallel Bitmap Heap Scan on crypto_trades_active (cost=25,151.96..35,642.07 rows=1,788 width=85) (actual time=0.445..1.852 rows=1,556 loops=2)

  • Recheck Cond: (crypto_trade_status_id = 10)
  • Heap Blocks: exact=21
9. 0.317 0.317 ↓ 1.0 3,112 1 / 2

Bitmap Index Scan on crypto_trades_active_crypto_trade_status_id_index (cost=0.00..25,151.20 rows=3,039 width=0) (actual time=0.634..0.634 rows=3,112 loops=1)

  • Index Cond: (crypto_trade_status_id = 10)
10. 4.668 4.668 ↑ 1.0 1 3,112 / 2

Index Scan using crypto_trades_disputed_crypto_trade_id_index on crypto_trades_disputed (cost=0.43..7.80 rows=1 width=289) (actual time=0.003..0.003 rows=1 loops=3,112)

  • Index Cond: (crypto_trade_id = crypto_trades_active.id)
11. 1.556 4.668 ↑ 1.0 1 3,112 / 2

Bitmap Heap Scan on payment_methods (cost=6.41..10.42 rows=1 width=27) (actual time=0.003..0.003 rows=1 loops=3,112)

  • Recheck Cond: (id = crypto_trades_active.payment_method_id)
  • Heap Blocks: exact=43
12. 3.112 3.112 ↑ 1.0 1 3,112 / 2

Bitmap Index Scan on payment_methods_pkey (cost=0.00..6.41 rows=1 width=0) (actual time=0.002..0.002 rows=1 loops=3,112)

  • Index Cond: (id = crypto_trades_active.payment_method_id)
13. 0.070 0.344 ↑ 1.0 191 2 / 2

Hash (cost=368.91..368.91 rows=191 width=8) (actual time=0.343..0.344 rows=191 loops=2)

  • Buckets: 1,024 Batches: 1 Memory Usage: 16kB
14. 0.274 0.274 ↑ 1.0 191 2 / 2

Seq Scan on fiat_currencies (cost=0.00..368.91 rows=191 width=8) (actual time=0.010..0.274 rows=191 loops=2)

15. 1.556 1.556 ↓ 0.0 0 3,112 / 2

Index Scan using user_accounts_pkey on user_accounts assignee_account (cost=0.43..4.25 rows=1 width=30) (actual time=0.001..0.001 rows=0 loops=3,112)

  • Index Cond: (id = crypto_trades_disputed.dispute_assigned_user_account_id)
16. 4.668 4.668 ↑ 1.0 1 3,112 / 2

Index Only Scan using user_accounts_id_username_avatarurl_idx on user_accounts seller_account (cost=0.43..4.39 rows=1 width=21) (actual time=0.003..0.003 rows=1 loops=3,112)

  • Index Cond: (id = crypto_trades_active.seller_id)
  • Heap Fetches: 0
17. 4.668 4.668 ↑ 1.0 1 3,112 / 2

Index Only Scan using user_accounts_id_username_avatarurl_idx on user_accounts buyer_account (cost=0.43..4.39 rows=1 width=21) (actual time=0.003..0.003 rows=1 loops=3,112)

  • Index Cond: (id = crypto_trades_active.buyer_id)
  • Heap Fetches: 0
18.          

SubPlan (for Gather)

19. 6.224 24.896 ↑ 1.0 1 3,112

Aggregate (cost=32.51..32.52 rows=1 width=8) (actual time=0.008..0.008 rows=1 loops=3,112)

20. 18.672 18.672 ↓ 4.0 4 3,112

Index Scan using crypto_trades_active_seller_id_index on crypto_trades_active crypto_trades_active_1 (cost=0.41..32.51 rows=1 width=0) (actual time=0.003..0.006 rows=4 loops=3,112)

  • Index Cond: (seller_id = crypto_trades_disputed.dispute_started_by)
  • Filter: (crypto_trade_status_id = 10)
  • Rows Removed by Filter: 1
21. 3.112 9.336 ↑ 1.0 1 3,112

Aggregate (cost=20.50..20.51 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=3,112)

22. 6.224 6.224 ↓ 0.0 0 3,112

Index Scan using crypto_trades_active_buyer_id_index on crypto_trades_active crypto_trades_active_2 (cost=0.41..20.50 rows=1 width=0) (actual time=0.002..0.002 rows=0 loops=3,112)

  • Index Cond: (buyer_id = crypto_trades_disputed.dispute_started_by)
  • Filter: (crypto_trade_status_id = 10)
  • Rows Removed by Filter: 0
23. 3.112 9.336 ↑ 1.0 1 3,112

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

24. 6.224 6.224 ↓ 0.0 0 3,112

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,112)

  • Index Cond: (trade_id = crypto_trades_disputed.crypto_trade_id)
  • Heap Fetches: 128