explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RrKy

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

Limit (cost=1,116.46..1,116.47 rows=1 width=278) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Sort (cost=1,116.46..1,116.47 rows=1 width=278) (actual rows= loops=)

  • Sort Key: d.placement
3. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=940.95..1,116.45 rows=1 width=278) (actual rows= loops=)

  • Join Filter: ((d.product)::text = (pr."productCode")::text)
4. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=940.95..1,106.84 rows=1 width=203) (actual rows= loops=)

  • Join Filter: (s."deviceId" = d.id)
5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=23.60..34.03 rows=1 width=188) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

HashAggregate (cost=23.32..25.72 rows=1 width=16) (actual rows= loops=)

  • Group Key: tl.deviceid
  • Filter: (count(tl.id) = 1)
7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.28..22.36 rows=192 width=20) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Seq Scan on tags t (cost=0.00..1.15 rows=1 width=4) (actual rows= loops=)

  • Filter: ((slug)::text = 'os-ios'::text)
9. 0.000 0.000 ↓ 0.0

Index Scan using tag_links_tagid on tag_links tl (cost=0.28..18.33 rows=288 width=24) (actual rows= loops=)

  • Index Cond: (tagid = t.id)
10. 0.000 0.000 ↓ 0.0

Index Scan using device_tmp_pkey on devices d (cost=0.28..8.30 rows=1 width=188) (actual rows= loops=)

  • Index Cond: (id = tl.deviceid)
  • Filter: (status = 'operation'::device_status_type)
11. 0.000 0.000 ↓ 0.0

Subquery Scan on s (cost=917.35..1,072.51 rows=24 width=31) (actual rows= loops=)

  • Filter: (s.dest_rank = 1)
12. 0.000 0.000 ↓ 0.0

WindowAgg (cost=917.35..1,012.83 rows=4,774 width=39) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Sort (cost=917.35..929.29 rows=4,774 width=31) (actual rows= loops=)

  • Sort Key: device_status."deviceId", device_status."changedAt" DESC
14. 0.000 0.000 ↓ 0.0

Seq Scan on device_status (cost=0.00..625.64 rows=4,774 width=31) (actual rows= loops=)

  • Filter: ((status)::text = ANY ('{online,offline}'::text[]))
15. 0.000 0.000 ↓ 0.0

Seq Scan on products pr (cost=0.00..7.05 rows=205 width=100) (actual rows= loops=)