explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3VOO

Settings
# exclusive inclusive rows x rows loops node
1. 0.405 206,942.115 ↓ 0.0 0 1

Nested Loop (cost=15.84..673.66 rows=1 width=14) (actual time=206,942.115..206,942.115 rows=0 loops=1)

  • Planning time: 0.998 ms
  • Execution time: 206942.215 ms
2. 116,016.712 206,940.954 ↓ 2.5 126 1

Nested Loop (cost=15.70..665.52 rows=50 width=38) (actual time=92,401.330..206,940.954 rows=126 loops=1)

3. 0.970 90,923.226 ↓ 2.5 127 1

HashAggregate (cost=10.62..11.12 rows=50 width=146) (actual time=90,922.903..90,923.226 rows=127 loops=1)

  • Group Key: (SubPlan 1)
4. 0.000 90,922.256 ↓ 2.6 132 1

Seq Scan on balances_account ba (cost=0.00..10.50 rows=50 width=146) (actual time=914.370..90,922.256 rows=132 loops=1)

5.          

SubPlan (forSeq Scan)

6. 15.281 206,893.603 ↑ 1.0 1 259

Limit (cost=0.43..4.64 rows=1 width=12) (actual time=798.760..798.817 rows=1 loops=259)

7. 206,878.322 206,878.322 ↑ 22,714.0 1 259

Index Scan Backward using balances_snapshot_created_at on balances_snapshot bs (cost=0.43..95,633.35 rows=22,714 width=12) (actual time=798.758..798.758 rows=1 loops=259)

  • Filter: ((account_id)::text = (ba.id)::text)
  • Rows Removed by Filter: 1182872
8. 1.016 1.016 ↑ 1.0 1 127

Index Scan using balances_snapshot_pkey on balances_snapshot (cost=5.07..13.09 rows=1 width=42) (actual time=0.008..0.008 rows=1 loops=127)

  • Index Cond: (id = (SubPlan 1))
9. 0.756 0.756 ↓ 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.006..0.006 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