Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Tuning PL/SQL
On 16 May 2003 13:23:15 -0700, danielroy10_at_hotmail.com (Daniel Roy)
wrote:
>Bare also in mind that each language has its specialty, and PL/SQL is
>not a good choice when doing lots of calculations (use C for this). If
>on 9i, you can also run the native code (instead of interpreting the
>code, I think), which is supposedly faster.
One way to help with calculations is to do integer arithmetic with PLS_INTEGER variables instead of NUMBER or INTEGER. (INTEGER in SQL and PL/SQL is really NUMBER without anything after the decimal point.)
On the SQL side, look for opportunities to use the FORALL statement for INSERT/UPDATE/DELETE, and BULK COLLECT INTO for queries. These can speed up or replace loops around SQL operations.
John
-- Photo gallery: http://www.pbase.com/john_russell/Received on Fri May 16 2003 - 23:46:33 CDT