Subject RE: [IBO] Commit in Stored Procedure
Author Alan McDonald
if your data structure lends itself to this kind of operation, when the
procedure fires, you will not believe, at first, that it has actually
processed all the records
Alan

-----Original Message-----
From: Bayu [mailto:bayu@...]
Sent: Tuesday, 28 January 2003 5:29 PM
To: IBObjects@yahoogroups.com
Subject: RE: [IBO] Commit in Stored Procedure


Hello Alan,

> I doubt it's the committing that's problem. It's more likely to be server
> memory and your attempt to use too much of it in one hit.

Thah's right. Memory usage is using more and more ...

>If instead of
> using e.g. select * from table1 where table1 has 300000 records,
> use several
> for select * from table1 where foreignkey=:variable into etc do begin
> end
> loops where variable is a distinct value already selected
>
> I have rooms inside buildings inside schools inside districts
> (total 470,000
> rooms) when I want to process all rooms I use this structure. It
> can process
> very quickly compared with any attempt to process rooms from a
> select * from
> rooms query
>
> FOR SELECT DISTID FROM DISTRICTS WHERE mycondition="T" INTO :DIST
> DO BEGIN
> FOR SELECT SRECNO FROM SCHOOLS WHERE DSEDOFF=:DIST INTO :SREC
> DO BEGIN
> FOR SELECT BNO FROM BUILDINGS WHERE SRECNO=:SREC INTO :BBNO
> DO BEGIN
> <my code to process rooms>
> END
> END
> END
>
> If you watch with some debugging code you can compare this
> process with the
> select * from structure, the select * from table structure takes all it's
> time in the select * from table call before you even get to any processing
> code.

I will try to separate record proses and your suggestion.
Thanks in advance

regards
Bayu



___________________________________________________________________________
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/