explain.depesz.com

PostgreSQL's explain analyze made readable

Result: orAJ

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

Sort (cost=20.72..20.72 rows=1 width=42) (actual rows= loops=)

  • Sort Key: (max(sc_1.id)) DESC NULLS LAST
2. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=15.91..20.71 rows=1 width=42) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=15.76..20.30 rows=1 width=10) (actual rows= loops=)

  • Hash Cond: ((sc_1.sensor_id)::text = (s.id)::text)
4. 0.000 0.000 ↓ 0.0

HashAggregate (cost=14.50..16.50 rows=200 width=106) (actual rows= loops=)

  • Group Key: sc_1.sensor_id
5. 0.000 0.000 ↓ 0.0

Seq Scan on sensor_configs sc_1 (cost=0.00..13.00 rows=300 width=106) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Hash (cost=1.25..1.25 rows=1 width=4) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Seq Scan on sensors s (cost=0.00..1.25 rows=1 width=4) (actual rows= loops=)

  • Filter: ((device)::text = '06cc3585-b84e-4025-aac6-bc416348fd0a'::text)
8. 0.000 0.000 ↓ 0.0

Index Scan using sensor_configs_pk on sensor_configs sc (cost=0.15..0.41 rows=1 width=40) (actual rows= loops=)

  • Index Cond: ((max(sc_1.id)) = id)