Subject Re: [firebird-support] MON$ATTACHMENT performance issue
Author Mark Rotteveel
On 2019-08-26 14:36, RĂ³bert Sisa robert.sisa@...
[firebird-support] wrote:
> Hi All,
>
> I have a problem with Firebird 3.0.4. When i run this query:
>
> SELECT 0 FROM MON$ATTACHMENTS
>
> the result set contains 94 records and it run for 1.2 second. It cause
> performance problems in my program.
>
> Can anybody help me? It looks like a FB bug...

The monitoring tables are not physical tables, but virtual ones.
Selecting from monitoring tables is not cheap as Firebird will need to
create a snapshot for the data to populate all monitoring tables for
your transaction (although I'm not sure if 1.2 seconds is too much or
not for 94 connections). So, why are you selecting 0 from
MON$ATTACHMENTS? What is your use case?

Mark