explain.depesz.com

PostgreSQL's explain analyze made readable

Result: YlYq

Settings
# exclusive inclusive rows x rows loops node
1. 0.472 305.547 ↑ 1.0 1 1

Aggregate (cost=35,238.22..35,238.23 rows=1 width=37) (actual time=305.546..305.547 rows=1 loops=1)

2. 0.525 305.075 ↑ 1.6 418 1

Nested Loop (cost=0.56..35,233.24 rows=665 width=37) (actual time=0.126..305.075 rows=418 loops=1)

3. 0.054 0.054 ↑ 1.0 1 1

Index Only Scan using programs_pkey on programs p (cost=0.14..4.16 rows=1 width=8) (actual time=0.051..0.054 rows=1 loops=1)

  • Index Cond: (id = 1)
  • Heap Fetches: 0
4. 1.395 304.496 ↑ 1.6 418 1

Nested Loop Left Join (cost=0.42..35,222.43 rows=665 width=45) (actual time=0.068..304.496 rows=418 loops=1)

5. 300.175 300.175 ↑ 1.6 418 1

Seq Scan on virtual_accounts va (cost=0.00..30,051.18 rows=665 width=16) (actual time=0.042..300.175 rows=418 loops=1)

  • Filter: (program_id = 1)
  • Rows Removed by Filter: 893,692
6. 2.926 2.926 ↑ 1.0 1 418

Index Scan using users_pkey on users u (cost=0.42..7.77 rows=1 width=45) (actual time=0.007..0.007 rows=1 loops=418)

  • Index Cond: (va.user_id = id)
Planning time : 1.702 ms
Execution time : 305.726 ms