Subject Re: [firebird-support] Newbie question RE: Memory usage
Author Daniel Rail
Hi,

At September 25, 2003, 12:13, cluedeck wrote:

> If I set the parameter value to -1 and open the dataset, I get back
> 0 records as expected. However, using the Task Manager, I see that
> opening the dataset is taking up about 30Mb of swap file space. If
> I set the parameter to 30, I get back one record, and the same
> amount of swap file space is being used.

> What is happening here? Is it loading the entire dataset into the
> memory of my client and then doing the select there? Even if that
> is the case, I cannot believe this would occupy 30Mb.

Firebird could be using over 2/3 of the 30MB, without having any
database loaded. And, when a database is loaded, Firebird loads the
metadata into memory. So, that could be another portion of the memory
used.

> I have got a datamodule with about 40 queries, all of which return
> one record at a time (as the example above), or select all records
> from a small table (< 10 rows). Opening all of the dataset on this
> datamodule is eating up 300Mb of swap file space. This seems
> absolutely incredible, considering the entire .GDB file is only 4Mb.

I have more than what you have and with a single connection the
virtual memory used is around 90MB. And, this is with a 3GB database
and after retrieving data from tables containing 13000 records and
49000 records. But, this is with FB 1.5, not FB 1.0.3.

> Can anyone explain what is happening here?

Have you tried it with FB 1.5 to see if the same effect occurs?

--
Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)