Take the 2-minute tour ×  In an Oracle 10g environment, I have a
statement that needs to be executed several million times based
on the results of a cursor. For flexibility, the current code
has the statement as a constant in the package body. Here is a
simplified version of the code. Please keep in mind this is all
within the same package:  c_Stmt  CONSTANT VARCHAR2(128) :=
'DELETE FROM t WHERE fldA = :b1';   PROCEDURE p1(vSomeNumber
NUMBER(10)) IS   FOR i IN 1 .. 9999999  Since the dynamic SQL
already uses bind variables, is there any performance advantage
to rewriting this code to replace the dynamic SQL with a regular
DML statement like this:  PROCEDURE p1(vSomeNumber NUMBER(10))
IS   /* EXECUTE IMMEDIATE c_Stmt USING vSomeNumber; */   DELETE
FROM t WHERE fldA = vSomeNumber;  I think the impact might be on
the number of parses, but it's unclear to me if that's still a
concern in 10g.  Thank you for your answers.  share|improve this
question  5 Answers 5  up vote 3 down vote accepted  Regular SQL
is faster