Subject Re: Memory Usage when accessing larger tables
Author williamvdw2004
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@t...>
wrote:
> At 05:45 PM 29/11/2004 +1100, you wrote:
>
> > > I have made this post before but did not get any response. Can
> > > someone at least tell me if this is normal. All help will be
> > > appreciated.
> > >
> > > I have a database (FB 1.5) with about 300 000 records in one
> > > table, I am using IBO for connectivity. The problem is that
when I do
> > > a query (on the big table) whether there is data returned or
not +/-
> > > 250 megs of ram gets used. The ram is only freed once I
disconnect
> > > from the database.
> > >
> > > What can I do to make the memory usage less?
> > >
> > > Thanks
> > > William
> >
> >do you limit the query by use of a WHERE clause at all? or are you
just
> >pulling up all 300000 records?
>
> Additionally, do you ever commit the select statement during the
course of
> the user's session?
>
> ./hb

Hi yes I limit the select satment with a where clause a status
flield. This select returns minimal rows 1 or 2 the most I have seen
is 5 rows (out of 300 000). Yes I do a commit -
IB_Transaction.CommitRetaining

This select is not critical to the working of my program and I have
commented it out, then the next select statemnt takes the 250 mb of
ram. This statemment is as follows.

'SELECT MAX(TIMESENT) AS LASTREC from ' + TableName

I also do a commitRetaining after this statment. (have used this code
in test app with the same results)

Thanks
William