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: Why does the optimizer ignore the FFS_INDEX hint ???

Re: Why does the optimizer ignore the FFS_INDEX hint ???

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Wed, 11 Oct 2000 07:59:47 +0200
Message-ID: <971288726.6856.0.pluto.d4ee154e@news.demon.nl>

You are using the wrong alias /spelling in the hint. Also, IIRC, group by *always* means sort. I don't know what you are trying to accomplish, you are using a group by artnr, and you are not using artnr in the select clause. This is another reason for the optimizer not to use the index. Maybe a strong cup of coffee, and reconsider?

Regards,

Sybrand Bakker, Oracle DBA

"Roger" <rg_at_mcs-hh.de> wrote in message
news:8s0rv5$9v2$1_at_garnet.hamburg.cityline.net...
> I tried the following
>
> select /*+ INDEX_FFS (artikel artnr) */ count(1) from article group by
 artnr
>
> The optimizer does a full table scan and a sort operation. Since there is
 a
> index on artnr I don't understand why Oracle doesn't do a fast full scan
 on
> the index and just count the records. I don't see why there is a sort
> operation involved, since an index with the rigth sort order can be used.
> The other thing I don't understand is that the hint is ignored ?
>
> Regards
> Roger
>
>
>
Received on Wed Oct 11 2000 - 00:59:47 CDT

Original text of this message

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