Database Tuning (MOSC)

MOSC Banner

Why isn't my FORALL insert faster than a normal FOR LOOP ?

edited Nov 4, 2009 2:40PM in Database Tuning (MOSC) 6 commentsAnswered
 

Hi,

I'm trying to speed up the inserts in a pl/sql package by converting a FOR LOOP into a FORALL. But I'm not noticing any difference.  Running the same test under exactly the same conditions I'm getting 1000 inserts every 12 secs using a FOR LOOP and getting 1000 inserts every 14 secs using a FORALL. 

I'm running a 10.2.0.4 database, with the optimizer level also set to 10.2.0.4.

Could it be because the optimizer is under the covers treating the FOR LOOP as a  FORALL? or do I need to check some other db parameters?

For loop code:

    FOR i IN rec_cp.FIRST..rec_cp.LAST

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center