For capacity management we need to find out how many alarms have been processed by SOI in each quarter of the year.
We have tried using the query below
select COUNT(*) from Alerts where LoggedTime >= '2017-04-01 00:00:00' and LoggedTime < '2017-07-01 00:00:00';
However - the result was just 151k alarms - which seemed too low.
The same query run against the SAMstoreArchive db resulted in 1850k alarms.
Is the real number the combined number of alarms from each db?
The select COUNT(*) from Alerts where LoggedTime >= '2017-04-01 00:00:00' and LoggedTime < '2017-07-01 00:00:00'
will only return unique alarms
You also have to keep in mind the repeated alarms. (The Repeat count column in the DB).
If you are archiving alerts older than 60 days and you need to run a query for a period of 3 months, you need to query to query SOIArchiveDB as well. To get the number of alarms processed for 3 months, run the queries below against both DBs
e.g.
select COUNT(*) from Alerts where LoggedTime >= '2017-06-01 00:00:00' and LoggedTime <= '2017-09-01 00:00:00'
select RepeatCount from Alerts where LoggedTime >= '2017-06-01 00:00:00' and LoggedTime <= '2017-09-01 00:00:00'
Add the sum of the RepeatCount to the Unique Alarms Total and combine the results from both DBs