explain.depesz.com

PostgreSQL's explain analyze made readable

Result: vH1q

Settings
# exclusive inclusive rows x rows loops node
1. 0.110 13.729 ↓ 0.0 0 1

Nested Loop (cost=14.57..610.33 rows=1 width=14) (actual time=13.729..13.729 rows=0 loops=1)

  • Planning time: 0.458 ms
  • Execution time: 13.789 ms
2. 1.816 4.043 ↓ 2.5 126 1

Nested Loop (cost=14.43..602.18 rows=50 width=38) (actual time=1.936..4.043 rows=126 loops=1)

3. 0.158 1.973 ↓ 2.5 127 1

HashAggregate (cost=10.62..11.12 rows=50 width=146) (actual time=1.917..1.973 rows=127 loops=1)

  • Group Key: (SubPlan 1)
4. 0.000 1.815 ↓ 2.6 132 1

Seq Scan on balances_account ba (cost=0.00..10.50 rows=50 width=146) (actual time=0.027..1.815 rows=132 loops=1)

5.          

SubPlan (forSeq Scan)

6. 0.259 3.108 ↑ 1.0 1 259

Limit (cost=0.56..3.37 rows=1 width=12) (actual time=0.012..0.012 rows=1 loops=259)

7. 2.849 2.849 ↑ 22,740.0 1 259

Index Scan Backward using account_id_created_at on balances_snapshot bs (cost=0.56..64,097.39 rows=22,740 width=12) (actual time=0.011..0.011 rows=1 loops=259)

  • Index Cond: ((account_id)::text = (ba.id)::text)
8. 0.254 0.254 ↑ 1.0 1 127

Index Scan using balances_snapshot_pkey on balances_snapshot (cost=3.80..11.82 rows=1 width=42) (actual time=0.002..0.002 rows=1 loops=127)

  • Index Cond: (id = (SubPlan 1))
9. 9.576 9.576 ↓ 0.0 0 126

Index Scan using balances_account_id_05d62932_like on balances_account (cost=0.14..0.16 rows=1 width=146) (actual time=0.076..0.076 rows=0 loops=126)

  • Index Cond: ((id)::text = (balances_snapshot.account_id)::text)
  • Filter: (((property_type)::text = 'asset'::text) AND ((currency)::text = 'BTC'::text))
  • Rows Removed by Filter: 1