Sub-optimal performance for Monitoring plugin

Description

Report from the forums:

— Monitoring plugin have a very strange code, that inserts messages into database.
— It select count of all messages from database with query: SELECT COUNT FROM ofMessageArchive
— Next, this number increased by 1, and inserted into database as “messageID” field.
— This code generates heavy load on database with huge number of archived messages and online users.
— For example - for me, query executes 3-4 seconds (SSD, MSSQL, 75 millions messages stored).
— Database can have autoincrement field, that works much faster.

Though I don't know how easy it would be to retrofit an auto-increment field to all supported databases. It may be more practical to use a JiveID, for example. 

Environment

None

Activity

Show:
Daryl Herzmann
January 4, 2019, 3:47 PM
Not a bug

Assignee

Unassigned

Reporter

Greg Thomas

Labels

None

Expected Effort

None

Components

Affects versions

Priority

Major