Discussion:
Out of memory
(too old to reply)
pcerdaz
2008-02-19 18:41:58 UTC
Permalink
Hello,

I have a simple application where a DBGrid is showing an InterBase tabla
using a DataSet; the tabla has about 400.000 records.

When I try to navigate to the last record the aplication show an error
message: "Out of memory" and BDS2006 showing next error message: "...
exception class EOutOfMemory with message 'Out of memory'".

What can be wrong?

Than you,
pcerdaz
Jeff Overcash (TeamB)
2008-02-20 02:02:49 UTC
Permalink
Post by pcerdaz
Hello,
I have a simple application where a DBGrid is showing an InterBase tabla
using a DataSet; the tabla has about 400.000 records.
When I try to navigate to the last record the aplication show an error
message: "Out of memory" and BDS2006 showing next error message: "...
exception class EOutOfMemory with message 'Out of memory'".
What can be wrong?
Than you,
pcerdaz
Either you really are out of memory or a contiguous piece of memory can not be
allocated to hold 400,000 records. Try increasing the bufferChunks property.
This indicates how many records worth of buffer to allocate each time it needs
to grow. Fewer growths mean faster performance and less fragmentation of
memory. It has the side effect of potentially using more memory, but if your
problem is actually fragmentation it will solve it.

Alternatively you need to look at your design. Humans can't search through
400,000 records. Have them give you some sort of search criteria first and
reduce the result set size they will look at.

Also look at the data returning, if you are doing a select *, change it to only
those columns you must show. This will reduce the overall memory needs.
--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
And so I patrol in the valley of the shadow of the tricolor
I must fear evil. For I am but mortal and mortals can only die.
Asking questions, pleading answers from the nameless
faceless watchers that stalk the carpeted corridors of Whitehall.
(Fish)
Loading...