explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 26Yh

Settings
# exclusive inclusive rows x rows loops node
1. 43.066 431.085 ↑ 1.0 1,001 1

HashAggregate (cost=37,017.33..37,029.85 rows=1,001 width=40) (actual time=430.911..431.085 rows=1,001 loops=1)

  • Group Key: tr.user_id
2. 34.681 388.019 ↑ 1.0 86,412 1

Nested Loop Left Join (cost=0.28..36,369.24 rows=86,412 width=12) (actual time=0.107..388.019 rows=86,412 loops=1)

3. 7.690 7.690 ↑ 1.0 86,412 1

Seq Scan on transactions tr (cost=0.00..1,415.12 rows=86,412 width=20) (actual time=0.008..7.690 rows=86,412 loops=1)

4. 0.000 345.648 ↑ 1.0 1 86,412

Limit (cost=0.28..0.38 rows=1 width=12) (actual time=0.004..0.004 rows=1 loops=86,412)

5. 345.648 345.648 ↑ 243.0 1 86,412

Index Scan using idx_es_ts on exchange_rates er (cost=0.28..26.28 rows=243 width=12) (actual time=0.004..0.004 rows=1 loops=86,412)

  • Index Cond: (ts <= tr.ts)
  • Filter: (((from_currency)::text = (tr.currency)::text) AND ((to_currency)::text = 'GBP'::text))
  • Rows Removed by Filter: 1
Planning time : 0.230 ms
Execution time : 431.201 ms