Fixed
Details
Assignee
OpenNMS Bug Mailing ListOpenNMS Bug Mailing ListReporter
Tilman KastnerTilman KastnerComponents
Fix versions
Affects versions
Priority
Minor
Details
Details
Assignee
OpenNMS Bug Mailing List
OpenNMS Bug Mailing ListReporter
Tilman Kastner
Tilman KastnerComponents
Fix versions
Affects versions
Priority
PagerDuty
PagerDuty
PagerDuty
Created November 25, 2005 at 12:05 PM
Updated November 4, 2015 at 3:58 AM
Resolved October 3, 2008 at 2:01 PM
In
src/services/org/opennms/netmgt/config/NotificationManager.java
a select is frequently made on notifications:
explain SELECT eventid FROM notifications WHERE eventuei=?
The eventuei field lacks an index, so there's always a sequential scan:
opennms=# explain SELECT eventid FROM notifications WHERE eventuei=15;
QUERY PLAN
---------------------------------------------------------------- Seq Scan on notifications (cost=0.00..413.68 rows=22 width=4)
Filter: ((eventuei)::text = '15'::text)
With index:
opennms=# explain SELECT eventid FROM notifications WHERE eventuei=15;
QUERY PLAN
-------------------------------------------------------------------------------------------------- Index Scan using notifications_eventuei_idx on notifications (cost=0.00..77.31
rows=20 width=4)
Index Cond: ((eventuei)::text = '15'::text)
So may I suggest to
create index notifications_eventuei_idx on notifications (eventuei);