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: Dynamic SQL

Re: Dynamic SQL

From: Chrysalis <cellis_at_iol.ie>
Date: 1997/04/20
Message-ID: <3359F3AC.6CDF@iol.ie>#1/1

Steve Cosner wrote:
>
> In article <3352FDFA.5A0B_at_concentric.net>, Neil <NEILJ_at_concentric.net> wrote:
> > (snip)
>
> Just use the static SQL, since you don't need the dynamic
> capabilities. I haven't compared the two methods, but the dynamic
> version could only be slower. And the coding to run the dynamic
> version would be more difficult. Why use it if it is not needed?
>
> (snip)

As a matter of fact, there is *no* run-time difference in performance between dynamic and static SQL and, yesy, I *have* measured it. This is because both are "dynamic" from the kernel's point of view: i.e. it receives a string to be parsed: it doesn't know or care whether the string is composed piecemeal or is in the source program as a complete string.

It is probably easier to maintain "static" statements in the code, but if you have a lot of nearly identical statements that can only execute one at a atime, it may be better to use a single cursor to process one of a number of dynamically-prepared versions at a time instead of declaring a number of different cursors.

Chrysalis.

Chrysalis. Received on Sun Apr 20 1997 - 00:00:00 CDT

Original text of this message

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