Subject | Re: [firebird-support] Slow join with mon$ tables |
---|---|
Author | Dmitry Yemanov |
Post date | 2009-02-20T09:09:28Z |
Douglas Tosi wrote:
What size is file <host>.mon in the FB root directory?
which is preserved until a transaction ends. But anyway, it shouldn't be
the physical memory, so it's unlikely to be a real problem.
difference?
Dmitry
>What do you mean by "allocated memory"? Physical or virtual one?
> 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 size is file <host>.mon in the FB root directory?
> Is this normal? It's ~50% increase in memory for a very simple select.Your very simple select creates a monitoring snapshot for 10K objects
> Should I report to the tracker?
which is preserved until a transaction ends. But anyway, it shouldn't be
the physical memory, so it's unlikely to be a real problem.
> 2) Joining mon$ tables with this number of statements is really slow.Could you please check the latest snapshot and tell us whether there's a
> For example:
> select
> mst.mon$timestamp time_started,
> mst.mon$sql_text sql_text,
> mios.mon$page_reads page_reads
> from mon$statements mst
> left join mon$io_stats mios
> on mios.mon$stat_id = mst.mon$stat_id
> and mios.mon$stat_group = 3
> where mst.mon$attachment_id <> current_connection
>
> uses this plan:
> PLAN JOIN (MON$STATEMENTS NATURAL, MON$IO_STATS NATURAL)
>
> and takes ~10s to execute. If I fetch all, it takes ~60s.
difference?
Dmitry