Subject Re: [firebird-support] Slow join with mon$ tables
Author Douglas Tosi
On Fri, Feb 20, 2009 at 6:09 AM, Dmitry Yemanov
<dimitr@...> wrote:
> Douglas Tosi wrote:
>>
>> 1) While firebird sits idle, just holding all this attachments and
>> statements, it's consuming 871MB. If I run a simple select * from
>> mon$attachments, allocated memory rises to 1.247MB. When I commit,
>> memory is back at 871MB.
>
> What do you mean by "allocated memory"? Physical or virtual one?

Not sure. Virtual, I guess.
I'm looking at Vista's TaskManager.
Working Set 1247 MB
Commit Charge 1805 MB

> What size is file <host>.mon in the FB root directory?

4 MB

>> 2) Joining mon$ tables with this number of statements is really slow.
>> ...
>> uses this plan:
>> PLAN JOIN (MON$STATEMENTS NATURAL, MON$IO_STATS NATURAL)
>> and takes ~10s to execute. If I fetch all, it takes ~60s.
>
> Could you please check the latest snapshot and tell us whether there's a
> difference?

No difference using current snapshot Firebird-2.1.2.18118-0_x64.

But 2.5 seems broken (Firebird-2.5.0.22983-0_x64).
mon$attachments display only the current_connection. I cannot see the
other 200 attachments.
Every attachment was made using sysdba. I should be able to view them.

thanks,
--
Douglas Tosi
www.sinatica.com