Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Updating a column with PL/SQL proc

Re: Updating a column with PL/SQL proc

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: 14 Dec 2001 06:44:42 -0800
Message-ID: <a20d28ee.0112140644.35a59dcd@posting.google.com>

"andrija" <ar35644_at_fer.hr> wrote in message news:<9vckgu$he9$1_at_as201.hinet.hr>...
> > begin
> >
> > execute immediate 'update test_plup set ' || clname || ' = :val1'
> > using val1;
> >
> > end;
> >
>
> What's the difference between
>
> execute immediate 'update test_plup set ' || clname || ' = :val1'
> using val1;
>
> and
>
> execute immediate 'update test_plup set ' || clname || ' = ' || val1;

The former will be hardparsed only once, at first execution, the latter will be hardparsed on every call. Generally speaking you should avoid this construct like hell as it will severely limit the scalability of your app, as it will become completely cpu-bound. Evidently the difference is also explained in the Oracle docs, as 'bind variable'

Hth
Sybrand Bakker
Senior Oracle DBA Received on Fri Dec 14 2001 - 08:44:42 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US