explain.depesz.com

A tool for finding a real cause for slow queries.

Result: fyR

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 0.017 37437.400 ↑ 217.4 69 1

Limit (cost=757495.18..758095.18 rows=15000 width=179) (actual time=37437.294..37437.400 rows=69 loops=1)

2. 0.080 37437.383 ↑ 757.2 69 1

Unique (cost=757495.18..759585.02 rows=52246 width=179) (actual time=37437.291..37437.383 rows=69 loops=1)

3. 0.249 37437.303 ↑ 746.4 70 1

Sort (cost=757495.18..757625.79 rows=52246 width=179) (actual time=37437.290..37437.303 rows=70 loops=1)

  • Sort Key: public.events.eventid, public.events.objectid, (to_char(to_timestamp((public.events.clock)::double precision), 'DD/MM/YYYY HH24:MI:SS'::text)), public.events.value, public.events.acknowledged, triggers.description, functions.itemid, items.description, items.hostid, templates.host, hostmacro.value, hosts.host, triggers.priority, items.lastvalue
  • Sort Method: quicksort Memory: 43kB
4. 1.012 37437.054 ↑ 746.4 70 1

Hash Left Join (cost=4190.68..753400.91 rows=52246 width=179) (actual time=36366.496..37437.054 rows=70 loops=1)

  • Hash Cond: (items.templateid = templates.hostid)
5. 0.098 37435.788 ↑ 746.4 70 1

Hash Join (cost=4145.03..752333.27 rows=52246 width=170) (actual time=36365.913..37435.788 rows=70 loops=1)

  • Hash Cond: (items.hostid = hosts.hostid)
6. 0.126 37430.627 ↑ 746.4 70 1

Hash Join (cost=3807.14..751277.00 rows=52246 width=144) (actual time=36360.819..37430.627 rows=70 loops=1)

  • Hash Cond: (functions.itemid = items.itemid)
7. 0.132 37408.682 ↑ 746.4 70 1

Hash Join (cost=968.43..747262.75 rows=52246 width=84) (actual time=36338.953..37408.682 rows=70 loops=1)

  • Hash Cond: (public.events.objectid = triggers.triggerid)
8. 0.086 37102.634 ↑ 421.8 69 1

Append (cost=0.00..745461.96 rows=29104 width=32) (actual time=36033.001..37102.634 rows=69 loops=1)

9. 0.001 0.001 ↓ 0.0 0 1

Seq Scan on events (cost=0.00..34.60 rows=2 width=32) (actual time=0.001..0.001 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
10. 0.057 0.057 ↓ 0.0 0 1

Seq Scan on events_y2011m07d30 events (cost=0.00..7.80 rows=1 width=32) (actual time=0.057..0.057 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
11. 0.001 0.001 ↓ 0.0 0 1

Seq Scan on events_y2011m08d06 events (cost=0.00..34.60 rows=2 width=32) (actual time=0.001..0.001 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
12. 0.573 0.573 ↓ 0.0 0 1

Seq Scan on events_y2011m08d13 events (cost=0.00..86.98 rows=1 width=32) (actual time=0.573..0.573 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
13. 2.610 2.610 ↓ 0.0 0 1

Seq Scan on events_y2011m08d20 events (cost=0.00..379.24 rows=1 width=32) (actual time=2.610..2.610 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
14. 2.582 2.582 ↓ 0.0 0 1

Seq Scan on events_y2011m08d27 events (cost=0.00..391.52 rows=1 width=32) (actual time=2.582..2.582 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
15. 5.378 5.378 ↓ 0.0 0 1

Seq Scan on events_y2011m09d03 events (cost=0.00..701.70 rows=1 width=32) (actual time=5.378..5.378 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
16. 5.766 5.766 ↓ 0.0 0 1

Seq Scan on events_y2011m09d10 events (cost=0.00..910.06 rows=1 width=32) (actual time=5.766..5.766 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
17. 0.014 0.014 ↓ 0.0 0 1

Seq Scan on events_y2011m09d17 events (cost=0.00..1.34 rows=1 width=32) (actual time=0.014..0.014 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
18. 0.382 0.382 ↓ 0.0 0 1

Seq Scan on events_y2011m09d24 events (cost=0.00..61.68 rows=1 width=32) (actual time=0.382..0.382 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
19. 0.001 0.001 ↓ 0.0 0 1

Seq Scan on events_y2011m10d01 events (cost=0.00..34.60 rows=410 width=32) (actual time=0.001..0.001 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
20. 5.383 5.383 ↓ 0.0 0 1

Seq Scan on events_y2011m10d08 events (cost=0.00..912.78 rows=1 width=32) (actual time=5.383..5.383 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
21. 16.430 16.430 ↓ 0.0 0 1

Seq Scan on events_y2011m10d15 events (cost=0.00..2626.62 rows=1 width=32) (actual time=16.430..16.430 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
22. 17.275 17.275 ↓ 0.0 0 1

Seq Scan on events_y2011m10d22 events (cost=0.00..2513.12 rows=1 width=32) (actual time=17.275..17.275 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
23. 10.916 10.916 ↓ 0.0 0 1

Seq Scan on events_y2011m10d29 events (cost=0.00..1681.18 rows=1 width=32) (actual time=10.916..10.916 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
24. 25.087 25.087 ↓ 0.0 0 1

Seq Scan on events_y2011m11d05 events (cost=0.00..4005.58 rows=1 width=32) (actual time=25.087..25.087 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
25. 30.642 30.642 ↓ 0.0 0 1

Seq Scan on events_y2011m11d12 events (cost=0.00..5041.12 rows=1 width=32) (actual time=30.642..30.642 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
26. 30.094 30.094 ↓ 0.0 0 1

Seq Scan on events_y2011m11d19 events (cost=0.00..5124.08 rows=1 width=32) (actual time=30.094..30.094 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
27. 27.047 27.047 ↓ 0.0 0 1

Seq Scan on events_y2011m11d26 events (cost=0.00..4837.38 rows=1 width=32) (actual time=27.047..27.047 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
28. 13.191 13.191 ↓ 0.0 0 1

Seq Scan on events_y2011m12d03 events (cost=0.00..2605.26 rows=1 width=32) (actual time=13.191..13.191 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
29. 24.510 24.510 ↓ 0.0 0 1

Seq Scan on events_y2011m12d10 events (cost=0.00..4813.08 rows=1 width=32) (actual time=24.510..24.510 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
30. 23.121 23.121 ↓ 0.0 0 1

Seq Scan on events_y2011m12d17 events (cost=0.00..4421.04 rows=1 width=32) (actual time=23.121..23.121 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
31. 21.458 21.458 ↓ 0.0 0 1

Seq Scan on events_y2011m12d24 events (cost=0.00..4332.92 rows=1 width=32) (actual time=21.458..21.458 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
32. 23.808 23.808 ↓ 0.0 0 1

Seq Scan on events_y2011m12d31 events (cost=0.00..4259.20 rows=1 width=32) (actual time=23.808..23.808 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
33. 73.265 73.265 ↓ 0.0 0 1

Seq Scan on events_y2012m01d07 events (cost=0.00..13602.16 rows=1 width=32) (actual time=73.265..73.265 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
34. 301.533 301.533 ↓ 0.0 0 1

Seq Scan on events_y2012m01d14 events (cost=0.00..57472.36 rows=1 width=32) (actual time=301.533..301.533 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
35. 873.442 873.442 ↓ 0.0 0 1

Seq Scan on events_y2012m01d21 events (cost=0.00..58714.90 rows=1 width=32) (actual time=873.442..873.442 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
36. 2207.708 2207.708 ↓ 0.0 0 1

Seq Scan on events_y2012m01d28 events (cost=0.00..58733.70 rows=1 width=32) (actual time=2207.708..2207.708 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
37. 1302.261 1302.261 ↓ 0.0 0 1

Seq Scan on events_y2012m02d04 events (cost=0.00..55326.56 rows=1 width=32) (actual time=1302.261..1302.261 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
38. 768.709 768.709 ↓ 0.0 0 1

Seq Scan on events_y2012m02d11 events (cost=0.00..26111.68 rows=1 width=32) (actual time=768.709..768.709 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
39. 2825.254 2825.254 ↓ 0.0 0 1

Seq Scan on events_y2012m02d18 events (cost=0.00..60426.54 rows=1 width=32) (actual time=2825.254..2825.254 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
40. 2147.261 2147.261 ↓ 0.0 0 1

Seq Scan on events_y2012m02d25 events (cost=0.00..38624.64 rows=292 width=32) (actual time=2147.261..2147.261 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
41. 436.527 436.527 ↓ 0.0 0 1

Seq Scan on events_y2012m03d03 events (cost=0.00..8941.66 rows=1 width=32) (actual time=436.527..436.527 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
42. 915.353 915.353 ↓ 0.0 0 1

Seq Scan on events_y2012m03d10 events (cost=0.00..9930.18 rows=38 width=32) (actual time=915.353..915.353 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
43. 1151.426 1151.426 ↓ 0.0 0 1

Seq Scan on events_y2012m03d17 events (cost=0.00..30314.96 rows=115 width=32) (actual time=1151.426..1151.426 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
44. 1908.171 1908.171 ↓ 0.0 0 1

Seq Scan on events_y2012m03d24 events (cost=0.00..43339.82 rows=1629 width=32) (actual time=1908.171..1908.171 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
45. 4385.768 4385.768 ↓ 0.0 0 1

Seq Scan on events_y2012m03d31 events (cost=0.00..55123.76 rows=5625 width=32) (actual time=4385.768..4385.768 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
46. 4087.108 4087.108 ↓ 0.0 0 1

Seq Scan on events_y2012m04d07 events (cost=0.00..59058.74 rows=6924 width=32) (actual time=4087.108..4087.108 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
47. 5762.546 5762.546 ↓ 0.0 0 1

Seq Scan on events_y2012m04d14 events (cost=0.00..61584.08 rows=4426 width=32) (actual time=5762.546..5762.546 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
48. 6434.040 6434.040 ↓ 0.0 0 1

Seq Scan on events_y2012m04d21 events (cost=0.00..50802.14 rows=8071 width=32) (actual time=6434.040..6434.040 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
49. 1235.848 1235.848 ↑ 22.3 69 1

Seq Scan on events_y2012m04d28 events (cost=0.00..7467.40 rows=1537 width=32) (actual time=166.246..1235.848 rows=69 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
50. 0.000 0.000 ↓ 0.0 0 1

Seq Scan on events_y2012m05d05 events (cost=0.00..34.60 rows=2 width=32) (actual time=0.000..0.000 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
51. 0.001 0.001 ↓ 0.0 0 1

Seq Scan on events_y2012m05d12 events (cost=0.00..34.60 rows=2 width=32) (actual time=0.001..0.001 rows=0 loops=1)

  • Filter: ((source = 0) AND ((clock)::double precision > date_part('epoch'::text, '2012-04-30 16:08:52+02'::timestamp with time zone)))
52. 4.949 305.916 ↑ 1.0 8871 1

Hash (cost=857.55..857.55 rows=8871 width=68) (actual time=305.916..305.916 rows=8871 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 896kB
53. 9.124 300.967 ↑ 1.0 8871 1

Hash Join (cost=447.42..857.55 rows=8871 width=68) (actual time=6.754..300.967 rows=8871 loops=1)

  • Hash Cond: (functions.triggerid = triggers.triggerid)
54. 285.116 285.116 ↑ 1.0 8871 1

Seq Scan on functions (cost=0.00..232.71 rows=8871 width=16) (actual time=0.004..285.116 rows=8871 loops=1)

55. 2.903 6.727 ↑ 1.0 5974 1

Hash (cost=372.74..372.74 rows=5974 width=52) (actual time=6.727..6.727 rows=5974 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 513kB
56. 3.824 3.824 ↑ 1.0 5974 1

Seq Scan on triggers (cost=0.00..372.74 rows=5974 width=52) (actual time=0.015..3.824 rows=5974 loops=1)

57. 4.899 21.819 ↑ 1.9 8817 1

Hash (cost=2627.76..2627.76 rows=16876 width=68) (actual time=21.819..21.819 rows=8817 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 868kB
58. 16.920 16.920 ↑ 1.9 8817 1

Seq Scan on items (cost=0.00..2627.76 rows=16876 width=68) (actual time=0.015..16.920 rows=8817 loops=1)

59. 0.129 5.063 ↑ 1.1 239 1

Hash (cost=334.75..334.75 rows=251 width=34) (actual time=5.063..5.063 rows=239 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
60. 0.249 4.934 ↑ 1.1 239 1

Hash Left Join (cost=282.51..334.75 rows=251 width=34) (actual time=4.333..4.934 rows=239 loops=1)

  • Hash Cond: (hosts.hostid = hostmacro.hostid)
61. 0.385 0.385 ↑ 1.1 239 1

Seq Scan on hosts (cost=0.00..42.51 rows=251 width=25) (actual time=0.014..0.385 rows=239 loops=1)

62. 0.933 4.300 ↓ 1.0 2334 1

Hash (cost=253.79..253.79 rows=2298 width=17) (actual time=4.300..4.300 rows=2334 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 110kB
63. 3.367 3.367 ↓ 1.0 2334 1

Seq Scan on hostmacro (cost=0.00..253.79 rows=2298 width=17) (actual time=0.010..3.367 rows=2334 loops=1)

  • Filter: ((macro)::text = '{$ID_EQUIPEMENT}'::text)
64. 0.102 0.254 ↑ 1.1 239 1

Hash (cost=42.51..42.51 rows=251 width=25) (actual time=0.254..0.254 rows=239 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
65. 0.152 0.152 ↑ 1.1 239 1

Seq Scan on hosts templates (cost=0.00..42.51 rows=251 width=25) (actual time=0.005..0.152 rows=239 loops=1)