Re: PL/SQL

From: Dick Dral <d.j.dral_at_fd.agro.nl>
Date: 1996/05/03
Message-ID: <3189F898.76A4_at_fd.agro.nl>#1/1


Tari Chan wrote:
>
> Hiya!
> We are developing this system using PL/SQL but we encounter some problem.
> We did a benchmark and discovered that each SQL statement took about 0.03
> second, and each record has to go through an average of about 100 SQL
> statement. This poses a problem because we have an average of about 8000
> records to process per run and this will take about 6.7 hours.
>
> we wonder is there any way we can do to improve performance (not
> including getting a better server). Any suggestions/ideas are
> greatly appreciated. Please email me at tchan_at_scscc1.scsnet.scs.com.sg
> Thank you for reading and have a great day!

You might consider using cursor loops, something like :

DECLARE
  CURSOR <cursor name> IS
    SELECT ....
    FOR UPDATE OF ...
BEGIN
  FOR <record> IN <cursor name> LOOP
    UPDATE ...
    WHERE CURRENT OF <cursor name>
  END LOOP;
END; Hope you can use it and a nice day to you too,

Dick Dral Received on Fri May 03 1996 - 00:00:00 CEST

Original text of this message