explain.depesz.com

PostgreSQL's explain analyze made readable

Result: E5wN

Settings
# exclusive inclusive rows x rows loops node
1. 843.460 53,662.150 ↓ 1.2 416,151 1

HashAggregate (cost=1,586,883.12..1,590,453.86 rows=357,074 width=68) (actual time=53,491.788..53,662.150 rows=416,151 loops=1)

  • Group Key: users.id, wallets.base_ccy, users.address
2. 392.605 52,818.690 ↓ 1.2 425,765 1

Nested Loop (cost=39,925.33..1,584,205.06 rows=357,074 width=68) (actual time=5,260.028..52,818.690 rows=425,765 loops=1)

3. 483.131 34,540.931 ↑ 1.1 425,837 1

Nested Loop (cost=39,924.77..1,236,532.49 rows=472,240 width=20) (actual time=5,259.865..34,540.931 rows=425,837 loops=1)

4. 10,667.156 15,820.014 ↑ 1.1 434,233 1

Bitmap Heap Scan on pockets (cost=39,924.21..428,941.29 rows=490,130 width=16) (actual time=5,259.768..15,820.014 rows=434,233 loops=1)

  • Recheck Cond: (currency = 'BTC'::bpchar)
  • Filter: ((state)::text = 'ACTIVE'::text)
  • Rows Removed by Filter: 105958
  • Heap Blocks: exact=296326
5. 5,152.858 5,152.858 ↑ 1.0 541,932 1

Bitmap Index Scan on pocket_currency_idx (cost=0.00..39,801.67 rows=560,255 width=0) (actual time=5,152.858..5,152.858 rows=541,932 loops=1)

  • Index Cond: (currency = 'BTC'::bpchar)
6. 18,237.786 18,237.786 ↑ 1.0 1 434,233

Index Scan using wallets_pk on wallets (cost=0.56..1.65 rows=1 width=36) (actual time=0.042..0.042 rows=1 loops=434,233)

  • Index Cond: (id = pockets.wallet_id)
  • Filter: ((state)::text = 'ACTIVE'::text)
  • Rows Removed by Filter: 0
7. 17,885.154 17,885.154 ↑ 1.0 1 425,837

Index Scan using users_pk on users (cost=0.56..0.74 rows=1 width=64) (actual time=0.042..0.042 rows=1 loops=425,837)

  • Index Cond: (id = wallets.owner_id)
  • Filter: (((state)::text = 'ACTIVE'::text) AND ((type)::text = 'PERSONAL'::text))
  • Rows Removed by Filter: 0
Planning time : 5.728 ms
Execution time : 53,706.730 ms