Currently, as a optimization, the code only checks the number of error reports by querying max(id) - min(id). This was done because count(id) does a full table scan. It would be better if the count was stored in the database and updated by triggers.
If this is done, the deadman threshold should be tweaked to account for a more accurate report count.
Currently, as a optimization, the code only checks the number of error reports by querying
max(id) - min(id)
. This was done becausecount(id)
does a full table scan. It would be better if the count was stored in the database and updated by triggers.If this is done, the deadman threshold should be tweaked to account for a more accurate report count.