explain.depesz.com

PostgreSQL's explain analyze made readable

Result: me1P

Settings
# exclusive inclusive rows x rows loops node
1. 0.093 23.962 ↓ 0.0 0 1

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

2. 1.853 23.617 ↓ 2.5 126 1

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

3. 0.161 21.510 ↓ 2.5 127 1

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

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

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

5.          

SubPlan (forSeq Scan)

6. 0.518 22.792 ↑ 1.0 1 259

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

7. 22.274 22.274 ↑ 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.086..0.086 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. 0.252 0.252 ↓ 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.002..0.002 rows=0 loops=126)

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