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: How to give hints about indizes ??

Re: How to give hints about indizes ??

From: <michael_bialik_at_my-deja.com>
Date: Fri, 29 Oct 1999 13:59:52 GMT
Message-ID: <7vc98m$o9q$1@nnrp1.deja.com>


Hi.

  1. WHERE column + 0 = :param_1 allows to PREVENT index usage by optimizer.
  2. SELECT /*+ INDEX ( tab_name ) */ - request to access tab_name table via any avaliable index.
  3. SELECT /*+ INDEX ( tab_name index_name ) */ - requast to access using specified index
  4. Look at SERVER TUNING doc. for full list of hints.

 HTH. Michael.

In article <7vc0ic$j4s_at_TGZ3>,
  "Michael Keppler" <Michael.Keppler_at_bigfoot.com> wrote:
> Hello everyone !
>
> I'm more an application programmer than a database admin and I
> recognized that some of my queries execute faster when I use
> ...
> and column<some_parameter+1
> and column>some_parameter-1
> ...
>
> instead of
> and column=some_parameter
>
> on an indexed integer column
>
> I guess it's because the optimizer tries to use an index on that
column
> in the second solution. I know that this column isn't very selective
> (maybe I select about 30% of all values), so it would be better if the
> optimizer would use an index on another column (the query is about 50
or
> more lines). How can I tell the optimizer not to use an index on that
> column in this query ?
> And is there a possibility to automatically test some variations of
> different optimizations so I can see which is the fastest ?
> And where can I find out more about hints for the optimizer in
general ?
> Are there some good web pages ?
>
> Ciao and Thanks, Michael.
>
> --
> Michael Keppler, MCSE, MCP+I
> IT logic GbR
> Michael.Keppler_at_gmx.de
>
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Fri Oct 29 1999 - 08:59:52 CDT

Original text of this message

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