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: Where can I get a complete list of all SQL Hints?

Re: Where can I get a complete list of all SQL Hints?

From: Bosco Ng <boscong_at_leccotech.com>
Date: Fri, 20 Jun 2003 22:52:14 +0800
Message-ID: <3ef31e72@shknews01>


> Really? So that stuff about:
> FOR READ or FETCH ONLY,
> FOR UPDATE
> OPTIMIZE FOR n ROWS
> FETCH FIRST n ROWS ONLY
>
> is for what? Ad-hoc queries?

Nooo.. you don;t need them, DB2 optimizer will take care for you :) The best part is, they don't have HINTS!

"Nuno Souto" <wizofoz2k_at_yahoo.com.au> wrote in message news:73e20c6c.0306191829.7a7f988e_at_posting.google.com...
> tonym101_at_hotmail.com (TM) wrote in message
news:<7b718442.0306190949.7429abf3_at_posting.google.com>...
>
> >
> > It's a database configuration parameter.
> >
>
> No. It's a session configuration parameter.
> If it was a database config parameter, it would apply
> to everything. It can however be defaulted.
>
>
> > > DB2's optimizer is neither smarter nor dumber, but more rigid in its
> > > behavior and more abstract.
> >
> > ...and neither this nor that, rarely but often, perhaps or perhaps not
> > I guess you mean?
>
> Precisely.
>
>
> >
> > > But which level's best? God knows.
> >
> > Default level 5 is generally fine and good for mixed load
> > environments. I'd recommend 7 for DSS-only environments running very
> > complex ad-hoc queries. If you are doing OLTP only then lower levels
> > may save a little time. This is all in the documentation.
>
>
> So, what happens in a mixed environment?
>
> > You choose
> > an appropriate value and then forget about it... people don't go
> > changing optimization level from query to query in practice.
> >
>
> Really? So that stuff about:
> FOR READ or FETCH ONLY,
> FOR UPDATE
> OPTIMIZE FOR n ROWS
> FETCH FIRST n ROWS ONLY
>
> is for what? Ad-hoc queries?
>
> Jeez...
>
> Cheers
> Nuno Souto
> wizofoz2k_at_yahoo.com.au.nospam
Received on Fri Jun 20 2003 - 09:52:14 CDT

Original text of this message

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