Re: Pro*C optimization: Done when?

From: Thomas J Kyte <tkyte_at_us.oracle.com>
Date: 1995/10/06
Message-ID: <453nob$8m_at_inet-nntp-gw-1.us.oracle.com>#1/1


Jay Ramadorai <76734.3633_at_CompuServe.COM> wrote:

>Is pro*c static SQL optimized (access path chosen) at precompile
>time (with the appropriate semantics/userid options) or run-time?

Run time always.

> It doesn't make sense to do it at precompile time as (a) the
>statistics can change between precompile and run and (b) the pgm
>may be run against a different db than the one it was compiled
>against.
> However, if it is done at run time, then static and dynamic SQL
>should perform the same in Pro*C except for maybe the extra time
>taken to perform privilege & object validation for Dynamic SQL?

6 one way, 1/2 dozen the other. Static sql is easier to program to. Dynamic more flexible. Both take the same route to the database however. Privelege and Object validation done at precompile time only gives you the programmer the warm fuzzy feeling that your program will work, it saves no time during run time (priveleges change between precomile and run time, need to be checked anyway)

> Any thoughts?
>Thanks
 

>--
>Jay Ramadorai
>Software Builders
>cserve: 76734, 3633

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government Received on Fri Oct 06 1995 - 00:00:00 CET

Original text of this message