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

Home -> Community -> Usenet -> c.d.o.server -> Re: Package Constants vs Literals

Re: Package Constants vs Literals

From: DA Morgan <damorgan_at_psoug.org>
Date: Thu, 19 Oct 2006 14:29:50 -0700
Message-ID: <1161293390.843331@bubbleator.drizzle.com>


klabu wrote:
> select *
> from sometable
> where somecol = 'SOMECODE'
> and someothercol = 'SOME_OTHER_CODE'
> and someothercol2 = some_numeric_code
>
>
>
> Is this a "good" thing (meaning NO performance impact) to do:
> If those "CODES" have a finite set of values..
> create a package and put those values in constants
> and replace those literals in the SQL with the package constants ?
>
> thanks

You have asked a question that is impossible to answer.

No Oracle version.
No information with respect to the data, cardinality, etc.

The only general statement one should make about Oracle is that general statements are often incorrect.

Go to Morgan's Library at www.psoug.org. Click on Explain Plan. You will find 9 SQL statements that return the exact same result set. Which one is the best? Depends on the version of Oracle.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Thu Oct 19 2006 - 16:29:50 CDT

Original text of this message

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