explain.depesz.com

PostgreSQL's explain analyze made readable

Result: f2EO

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=24.60..2,097,529.71 rows=200 width=36) (actual rows= loops=)

  • Group Key: tr.user_id
2. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=24.60..2,096,879.12 rows=86,412 width=68) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Index Scan using idx_user_id on transactions tr (cost=0.42..4,844.60 rows=86,412 width=60) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Limit (cost=24.19..24.19 rows=1 width=40) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Sort (cost=24.19..24.19 rows=1 width=40) (actual rows= loops=)

  • Sort Key: er.ts DESC NULLS LAST
6. 0.000 0.000 ↓ 0.0

Seq Scan on exchange_rates er (cost=0.00..24.18 rows=1 width=40) (actual rows= loops=)

  • Filter: ((ts <= tr.ts) AND ((from_currency)::text = (tr.currency)::text) AND ((to_currency)::text = 'GBP'::text))