explain.depesz.com

PostgreSQL's explain analyze made readable

Result: H616 : My plan

Settings
# exclusive inclusive rows x rows loops node
1. 10.632 120.409 ↑ 1.0 9,000 1

Nested Loop (cost=668.56..23,944.67 rows=9,000 width=9,118) (actual time=15.495..120.409 rows=9,000 loops=1)

2. 8.912 100.777 ↑ 1.0 9,000 1

Nested Loop (cost=668.14..19,234.42 rows=9,000 width=7,855) (actual time=15.487..100.777 rows=9,000 loops=1)

3. 5.492 82.865 ↑ 1.0 9,000 1

Hash Join (cost=667.72..14,770.96 rows=9,000 width=6,625) (actual time=15.479..82.865 rows=9,000 loops=1)

  • Hash Cond: (account0_.account_type_id = accounttyp3_.id)
4. 5.104 77.348 ↑ 1.0 9,000 1

Hash Join (cost=657.04..14,733.32 rows=9,000 width=4,532) (actual time=15.446..77.348 rows=9,000 loops=1)

  • Hash Cond: (account0_.account_state_id = accountsta2_.id)
5. 7.163 72.237 ↑ 1.0 9,000 1

Nested Loop Left Join (cost=645.92..14,696.57 rows=9,000 width=2,955) (actual time=15.433..72.237 rows=9,000 loops=1)

6. 0.880 56.074 ↑ 1.0 9,000 1

Nested Loop (cost=645.50..10,149.05 rows=9,000 width=2,879) (actual time=15.425..56.074 rows=9,000 loops=1)

7. 19.951 37.194 ↑ 1.0 9,000 1

Hash Join (cost=645.08..5,152.06 rows=9,000 width=51) (actual time=15.406..37.194 rows=9,000 loops=1)

  • Hash Cond: (accountinf6_.account_id = account1_.id)
8. 12.811 12.811 ↑ 1.0 199,999 1

Seq Scan on acc_account_informational_id accountinf6_ (cost=0.00..3,666.99 rows=199,999 width=43) (actual time=0.010..12.811 rows=199,999 loops=1)

9. 0.840 4.432 ↑ 1.0 9,000 1

Hash (cost=532.58..532.58 rows=9,000 width=8) (actual time=4.432..4.432 rows=9,000 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 480kB
10. 2.210 3.592 ↑ 1.0 9,000 1

HashAggregate (cost=442.58..532.58 rows=9,000 width=8) (actual time=2.724..3.592 rows=9,000 loops=1)

  • Group Key: account1_.id
11. 0.393 1.382 ↑ 1.0 9,000 1

Limit (cost=0.00..330.08 rows=9,000 width=8) (actual time=0.010..1.382 rows=9,000 loops=1)

12. 0.989 0.989 ↑ 22.2 9,000 1

Seq Scan on acc_account account1_ (cost=0.00..7,334.99 rows=199,999 width=8) (actual time=0.009..0.989 rows=9,000 loops=1)

13. 18.000 18.000 ↑ 1.0 1 9,000

Index Scan using acc_account_pkey on acc_account account0_ (cost=0.42..0.56 rows=1 width=2,836) (actual time=0.002..0.002 rows=1 loops=9,000)

  • Index Cond: (id = accountinf6_.account_id)
14. 9.000 9.000 ↑ 1.0 1 9,000

Index Scan using acc_account_balance_pkey on acc_account_balance accountbal1_ (cost=0.42..0.51 rows=1 width=76) (actual time=0.001..0.001 rows=1 loops=9,000)

  • Index Cond: (account0_.account_balance_id = id)
15. 0.001 0.007 ↑ 12.5 4 1

Hash (cost=10.50..10.50 rows=50 width=1,577) (actual time=0.007..0.007 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
16. 0.006 0.006 ↑ 12.5 4 1

Seq Scan on acc_account_state accountsta2_ (cost=0.00..10.50 rows=50 width=1,577) (actual time=0.005..0.006 rows=4 loops=1)

17. 0.004 0.025 ↑ 6.0 5 1

Hash (cost=10.30..10.30 rows=30 width=2,093) (actual time=0.025..0.025 rows=5 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
18. 0.021 0.021 ↑ 6.0 5 1

Seq Scan on acc_account_type accounttyp3_ (cost=0.00..10.30 rows=30 width=2,093) (actual time=0.018..0.021 rows=5 loops=1)

19. 9.000 9.000 ↑ 1.0 1 9,000

Index Scan using pk_acc_branch_snapshot on acc_branch_snapshot branchsnap4_ (cost=0.42..0.50 rows=1 width=1,230) (actual time=0.001..0.001 rows=1 loops=9,000)

  • Index Cond: (id = account0_.branch_id)
20. 9.000 9.000 ↑ 1.0 1 9,000

Index Scan using pk_acc_client_snapshot on acc_client_snapshot clientsnap5_ (cost=0.42..0.52 rows=1 width=1,247) (actual time=0.001..0.001 rows=1 loops=9,000)

  • Index Cond: (id = account0_.client_id)