Subject RE: [IBO] TIB_Query.next consume memory?
Author Thomas Steinmaurer
Hello Andreas,

if you do not need a bidirectional, scrollable result set,
you would be better using TIB_Cursor instead of TIB_Query.

A second thought is, that you write a stored procedure,
which is executed on the server and so the result set
doesn't need to be transferred to the client.

But, without know what you are doing in the loop, it's
hard to say if you can use a stored procedure.


Regards,
Thomas Steinmaurer
IB LogManager 2.1 - The Logging/Auditing Tool for InterBase and Firebird
http://www.iblogmanager.com

> -----Original Message-----
> From: anfisoft [mailto:andreas.filsinger@...]
> Sent: Friday, September 27, 2002 10:25 PM
> To: IBObjects@yahoogroups.com
> Subject: [IBO] TIB_Query.next consume memory?
>
>
> My really huge Query-result is about 130.000 records big. I have to
> look at each of the records for some reason and coded:
>
> with IB_Query1 do
> begin
> open;
> first;
> while not(eof) do
> begin
> // here some outcommented code
> next;
> end;
> close;
> end;
>
> i saw at the taskmanager that my app consumes more and more memory
> while seeking trough the results. I did more checks with AllocMemSize
> and found that each "next" consumes 48 Bytes of memory
> (130.000x48~6MByte for the whole loop), the Taskmanager reports even
> more memory usage: ~45Mbyte!!! I think each 48 Byte "delphi-memory"
> produce even more memory-consumption in the real world.
>
> Q: How can i seek through results WITHOUT loosing memory??
> Q: did the gds23.dll do the AllocMem
>
> Thanks for your help!
>
> Andreas Filsinger (Germany)
>
> PS: i set "readonly" to "true", fetchwholerows to "false", some other
> things - no difference!
>
>
>
>
> ___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
> ___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info papers,
> keyword-searchable FAQ, community code contributions and more !
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>