Subject Re: Negative impact on system performance querying monitoring tables.
Author Dmitry Yemanov
04.10.2019 15:01, Marcelo Guimaraes wrote:
>
> Reading about FB performance, I hit this page:
> https://firebirdsql.org/file/documentation/reference_manuals/fblangref25-en/html/fblangref25-appx05-montables.html
>
> My surprise on the note  was the warning: "In a highly loaded
> environment, collecting information via the monitoring tables could have
> a negative impact on system performance."

It should be re-phrased as: *frequent* collecting

This operation is costly and should be used with care.

> To administer a database and monitore his health usually we need to
> query monitoring tables (dictionary views).. On FB, according to the
> doc, we have a negative impact on system performance, so how can we by
> pass that?

Common recommendation is:

1) Do not query MON$ tables inside your SPs and triggers (ON
CONNECT/DISCONNECT triggers could be an exception)

2) Do not query MON$ tables very often. Depending on your load (read:
avg MON$ access time) it could be every >1min, >5min, etc.


Dmitry