explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wSJV

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.001 0.096 ↓ 0.0 0 1

Limit (cost=206.51..206.52 rows=1 width=249) (actual time=0.096..0.096 rows=0 loops=1)

2. 0.042 0.095 ↓ 0.0 0 1

Sort (cost=206.51..206.52 rows=1 width=249) (actual time=0.095..0.095 rows=0 loops=1)

  • Sort Key: (sum(t.sum_dat[1])) DESC
  • Sort Method: quicksort Memory: 25kB
3. 0.001 0.053 ↓ 0.0 0 1

GroupAggregate (cost=206.20..206.50 rows=1 width=249) (actual time=0.053..0.053 rows=0 loops=1)

  • Group Key: t.sensor, t.ip_addr, hosts_base.discovered, hosts_base.icon
4. 0.043 0.052 ↓ 0.0 0 1

Sort (cost=206.20..206.20 rows=1 width=319) (actual time=0.052..0.052 rows=0 loops=1)

  • Sort Key: t.sensor, t.ip_addr, hosts_base.discovered, hosts_base.icon
  • Sort Method: quicksort Memory: 25kB
5. 0.000 0.009 ↓ 0.0 0 1

Nested Loop (cost=9.67..206.19 rows=1 width=319) (actual time=0.009..0.009 rows=0 loops=1)

6. 0.000 0.009 ↓ 0.0 0 1

Nested Loop Left Join (cost=9.52..201.51 rows=1 width=323) (actual time=0.009..0.009 rows=0 loops=1)

7. 0.001 0.009 ↓ 0.0 0 1

Nested Loop (cost=9.38..201.29 rows=1 width=297) (actual time=0.009..0.009 rows=0 loops=1)

  • Join Filter: (hb.host_id = ho.host_id)
8. 0.008 0.008 ↓ 0.0 0 1

Seq Scan on hosts_os ho (cost=0.00..25.70 rows=8 width=8) (actual time=0.008..0.008 rows=0 loops=1)

  • Filter: (valid_until IS NULL)
9. 0.000 0.000 ↓ 0.0 0

Materialize (cost=9.38..175.36 rows=2 width=297) (never executed)

10. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=9.38..175.35 rows=2 width=297) (never executed)

  • Hash Cond: (((t.sensor)::text = (hb.sensor)::text) AND (t.ip_addr = hb.ip_addr))
11. 0.000 0.000 ↓ 0.0 0

Append (cost=0.00..162.61 rows=641 width=293) (never executed)

12. 0.000 0.000 ↓ 0.0 0

Seq Scan on hosts05 t (cost=0.00..0.00 rows=1 width=452) (never executed)

  • Filter: (("timestamp" >= '2019-10-07 11:00:00+00'::timestamp with time zone) AND ("timestamp" < '2019-10-08 11:00:00+00'::timestamp with time zone)
13. 0.000 0.000 ↓ 0.0 0

Seq Scan on "hosts05_pliesk-virt_2019001" t_1 (cost=0.00..159.40 rows=640 width=293) (never executed)

  • Filter: (("timestamp" >= '2019-10-07 11:00:00+00'::timestamp with time zone) AND ("timestamp" < '2019-10-08 11:00:00+00'::timestamp with time zone)
14. 0.000 0.000 ↓ 0.0 0

Hash (cost=7.95..7.95 rows=95 width=23) (never executed)

15. 0.000 0.000 ↓ 0.0 0

Seq Scan on hosts_base hb (cost=0.00..7.95 rows=95 width=23) (never executed)

16. 0.000 0.000 ↓ 0.0 0

Index Scan using hosts_base_unique on hosts_base (cost=0.14..0.22 rows=1 width=53) (never executed)

  • Index Cond: (((sensor)::text = (t.sensor)::text) AND (ip_addr = t.ip_addr))
17. 0.000 0.000 ↓ 0.0 0

Index Scan using os_pkey on os (cost=0.15..4.17 rows=1 width=4) (never executed)

  • Index Cond: (os_id = ho.os_id)
  • Filter: (parent_os_id = ANY ('{1013,1000,1001,1019,1037}'::integer[]))
Planning time : 3.025 ms
Execution time : 1.013 ms