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: Noons <wizofoz2k_at_yahoo.com.au.nospam>
Date: Sat, 21 Jun 2003 09:27:07 +1000
Message-ID: <3ef39be1$0$16256$afc38c87@news.optusnet.com.au>


"TM" <tonym101_at_hotmail.com> wrote in message news:7b718442.0306201427.1b798ddb_at_posting.google.com...

> FOR READ is not a hint, but the ANSI SQL standard for defining a
> cursor to be read-only. FOR FETCH is just a synonym that does the
> same thing.

Mind explaining why it is included in the section about tuning in the DB2 doco? Shouldn't it be in the standard SQL section?

> FOR UPDATE is not a hint, but the ANSI standard for defining a cursor
> to be updateable.
>

Same.

> > FETCH FIRST n ROWS ONLY
>
> OPTIMIZE FOR n ROWS is a soft limit that tells DB2 that you are likely
> to only want the first n rows of the result set, but does not prevent
> you fetching further rows if you change your mind. FETCH FIRST n ROWS
> ONLY is a hard limit that is DB2 direct syntactical equivalent of the
> ANSI SQL LIMIT TO n ROWS clause. It is not a hint and indeed alters
> the result set.

So why is it included in the doco in the section about tuning, with an EXPLICIT recommendation stating it changes the execution plan?

>
> Jeez... well quite. You pretend to know something about databases, so

Quite wrong. Unlike you, I NEVER pretended to "know something" about databases. That is your stupid claim, not mine.

> it's amazing that you seem to be unaware of the existence and

Oh, I am the one quoting them and I am unaware of what they do? Hellooooooooo? Anybody home?

BTW, personal attacks leave me quite unaffected, you should know this by now. Make sure you pass that on to your stupid organization so they stop the regular interventions here. I couldn't care less what you and your bunch of idiots think about me. Got it?

Oh yes: have you ever seen me interject in comp.databases.db2 or other crap product ngs? Never. Yet I keep seeing you dickheads regularly trolling around here. Enough said about your true motivation.

> usefulness of LIMIT clauses, and don't recognize standard ANSI clauses
> FOR READ ONLY and FOR FETCH ONLY but instead somehow imagine these are
> DB2 hints! If you really work in the industry then I suggest you try
> to keep your ignorance a little less high profile.

The "ANSI clauses" are in the section of UDB dealing with tuning, TOGETHER with a clause that is UNIQUE to DB2 and locks people in to their code and way of doing things. The UDB specific clause is not even recognized as such in the doco, just quietly slipped in.

The Oracle hints are standard ANSI comments and inefective in ANY SQL processor that follows the most basic ANSI compatibility. Therefore, they are COMPLETELY portable and do NOT lock ANYONE into their syntax.

Can you spot the difference or does it need to hit you square on the head?

>
> Was this really the best you could do?

Precisely.

--
Cheers
Nuno Souto
wizofoz2k_at_yahoo.com.au.nospam
Received on Fri Jun 20 2003 - 18:27:07 CDT

Original text of this message

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