explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Zu0J : Optimization for: Optimization for: plan #ks78; plan #WXIq

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.050 0.573 ↑ 1.0 1 1

Nested Loop (cost=4.85..26.29 rows=1 width=38) (actual time=0.414..0.573 rows=1 loops=1)

2. 0.182 0.420 ↑ 1.0 1 1

Hash Join (cost=1.25..8.62 rows=1 width=8) (actual time=0.292..0.420 rows=1 loops=1)

  • Hash Cond: ("currencyRates"."destinationCurrencyId" = currencies.id)
3. 0.192 0.192 ↑ 1.3 18 1

Seq Scan on "currencyRates" (cost=0.00..7.28 rows=23 width=16) (actual time=0.011..0.192 rows=18 loops=1)

  • Filter: ("sourceCurrencyId" = 1)
  • Rows Removed by Filter: 324
4. 0.023 0.046 ↑ 1.0 1 1

Hash (cost=1.24..1.24 rows=1 width=8) (actual time=0.046..0.046 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
5. 0.023 0.023 ↑ 1.0 1 1

Seq Scan on currencies (cost=0.00..1.24 rows=1 width=8) (actual time=0.015..0.023 rows=1 loops=1)

  • Filter: ((name)::text = 'USD'::text)
  • Rows Removed by Filter: 18
6. 0.083 0.103 ↑ 1.0 1 1

Bitmap Heap Scan on "currencyRateValues" (cost=3.60..17.66 rows=1 width=38) (actual time=0.095..0.103 rows=1 loops=1)

  • Recheck Cond: ("currencyRateId" = "currencyRates".id)
  • Filter: "isActive
  • Rows Removed by Filter: 53
  • Heap Blocks: exact=48
7. 0.020 0.020 ↓ 1.1 54 1

Bitmap Index Scan on "currencyRateValues_currencyRateId_idx" (cost=0.00..3.60 rows=48 width=0) (actual time=0.020..0.020 rows=54 loops=1)

  • Index Cond: ("currencyRateId" = "currencyRates".id)
Planning time : 0.429 ms
Execution time : 0.641 ms