explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KiRX

Settings
# exclusive inclusive rows x rows loops node
1. 0.016 0.344 ↑ 880.0 1 1

HashAggregate (cost=1,956.93..1,967.93 rows=880 width=68) (actual time=0.339..0.344 rows=1 loops=1)

  • Group Key: a.id, currency.id
2. 0.040 0.328 ↑ 1,760.0 1 1

Hash Right Join (cost=49.12..1,943.73 rows=1,760 width=68) (actual time=0.305..0.328 rows=1 loops=1)

  • Hash Cond: ((ua.id = a.id) AND (currency_1.id = currency.id))
3. 0.011 0.213 ↑ 1,760.0 1 1

Nested Loop Left Join (cost=0.15..1,863.97 rows=1,760 width=68) (actual time=0.197..0.213 rows=1 loops=1)

4. 0.011 0.055 ↑ 880.0 1 1

Nested Loop (cost=0.15..35.77 rows=880 width=36) (actual time=0.045..0.055 rows=1 loops=1)

5. 0.033 0.033 ↑ 1.0 1 1

Index Only Scan using user_account_pk on account ua (cost=0.15..8.17 rows=1 width=4) (actual time=0.029..0.033 rows=1 loops=1)

  • Index Cond: (id = 1)
  • Heap Fetches: 1
6. 0.011 0.011 ↑ 880.0 1 1

Seq Scan on currency currency_1 (cost=0.00..18.80 rows=880 width=32) (actual time=0.008..0.011 rows=1 loops=1)

7. 0.073 0.147 ↑ 2.0 1 1

GroupAggregate (cost=0.00..2.04 rows=2 width=40) (actual time=0.144..0.147 rows=1 loops=1)

  • Group Key: ao.account_id, ao.currency_id
8. 0.074 0.074 ↑ 1.0 27 1

Seq Scan on account_operation ao (cost=0.00..1.81 rows=27 width=13) (actual time=0.014..0.074 rows=27 loops=1)

  • Filter: ((account_id = ua.id) AND (currency_id = currency_1.id))
  • Rows Removed by Filter: 39
9. 0.016 0.075 ↑ 880.0 1 1

Hash (cost=35.77..35.77 rows=880 width=36) (actual time=0.074..0.075 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
10. 0.013 0.059 ↑ 880.0 1 1

Nested Loop (cost=0.15..35.77 rows=880 width=36) (actual time=0.046..0.059 rows=1 loops=1)

11. 0.031 0.031 ↑ 1.0 1 1

Index Only Scan using user_account_pk on account a (cost=0.15..8.17 rows=1 width=4) (actual time=0.027..0.031 rows=1 loops=1)

  • Index Cond: (id = 1)
  • Heap Fetches: 1
12. 0.015 0.015 ↑ 880.0 1 1

Seq Scan on currency (cost=0.00..18.80 rows=880 width=32) (actual time=0.011..0.015 rows=1 loops=1)

Planning time : 0.691 ms
Execution time : 0.602 ms