explain.depesz.com

PostgreSQL's explain analyze made readable

Result: K5AN

Settings

Optimization(s) for this plan:

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

Limit (cost=246.76..246.76 rows=1 width=249) (actual time=0.037..0.037 rows=0 loops=1)

2. 0.003 0.036 ↓ 0.0 0 1

Sort (cost=246.76..246.76 rows=1 width=249) (actual time=0.036..0.036 rows=0 loops=1)

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

GroupAggregate (cost=246.44..246.75 rows=1 width=249) (actual time=0.033..0.033 rows=0 loops=1)

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

Sort (cost=246.44..246.44 rows=1 width=319) (actual time=0.032..0.032 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.011 ↓ 0.0 0 1

Nested Loop Left Join (cost=9.52..246.43 rows=1 width=319) (actual time=0.011..0.011 rows=0 loops=1)

6. 0.001 0.011 ↓ 0.0 0 1

Nested Loop (cost=9.38..246.21 rows=1 width=293) (actual time=0.010..0.011 rows=0 loops=1)

  • Join Filter: (hb.host_id = ho.host_id)
7. 0.010 0.010 ↓ 0.0 0 1

Seq Scan on hosts_os ho (cost=0.00..70.84 rows=1 width=4) (actual time=0.010..0.010 rows=0 loops=1)

  • Filter: ((valid_until IS NULL) AND (os_id = ANY ('{1026,1027,1030,1031,1000,1032,1033,1001,1034,1002,1035,1003,1036,1004,1037,1038,1039,1040,1041,1013,1019,1022,1023}'::int
8. 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))
9. 0.000 0.000 ↓ 0.0 0

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

10. 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) AND ((sum_da
11. 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) AND ((sum_da
12. 0.000 0.000 ↓ 0.0 0

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

13. 0.000 0.000 ↓ 0.0 0

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

14. 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))
Planning time : 0.868 ms
Execution time : 0.138 ms