Re: Pro*C optimization: Done when?

From: Francisco Piragibe <piragibe_at_iis.com.br>
Date: 1995/10/16
Message-ID: <45uj3o$2rf_at_news.iis.com.br>#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?
> 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?
> Any thoughts?
>Thanks
>
>--
>Jay Ramadorai
>Software Builders
>cserve: 76734, 3633

All SQL is optimized at run time. So, if you run your program against a different database, or a different configuration, the execution plans will change to reflect this.

As regards static vs dynamic SQL, static SQL has an additional advantage. The syntax checking may be performed at compile time, thus saving a little effort when you run the program.

Best regards Received on Mon Oct 16 1995 - 00:00:00 CET

Original text of this message