Subject Memory Problem With Select
Author jamesg@taglim.com
I am having difficulty with the memory usage of IBServer.exe under
Windows NT and am hoping someone can help. Bascily every time I
execute a select statement using the api functions, the memory usage
of IBServer.exe grows. Here are the specifics:

If I open the database, do a select and then close the database then
the database only grows on the first select and never grows any
larger.

If I open the database, do a bunch of selects, and then close the
database then the database grows for each select, when done in a
tight loop the database grows at an alarming rate of about 1mb per
second.

I would just go with the first method, however the code is MUCH
slower in this case. Note that a program that does a select every
couple of seconds causes IBServer.exe to grow to hundreds of
megabytes in a few hours. Note also that this does not seem to
happen with non-select statements.

Here are some examples of the way I am calling it:

This will only increase memory size a small amount:

for (int n = 0; n < 2000; n++)
isc_attach_database
isc_start_transaction
isc_dsql_allocate_statement
isc_dsql_prepare
isc_dsql_describe
isc_dsql_execute
while (isc_dsql_fetch)
isc_dsql_free_statement
isc_commit_transaction
isc_detach_database

This will increase memory size very quickly:

isc_attach_database
for (int n = 0; n < 2000; n++)
isc_start_transaction
isc_dsql_allocate_statement
isc_dsql_prepare
isc_dsql_describe
isc_dsql_execute
while (isc_dsql_fetch)
isc_dsql_free_statement
isc_commit_transaction
isc_detach_database

James