Subject Newbie question RE: Memory usage
Author cluedeck
I have got an interbase database with a table containing 216 rows.
The table has about 15 fields, mostly varchar(40) or Integer. I am
querying from this table one record at a time using a query similar
to this:

SELECT * FROM tblOrganisation WHERE tblOrganisation.OrgID = :ORGID

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.

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.

Can anyone explain what is happening here?

By the way, I am using a single transaction object for all of my