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: Would Oracle use index on count(*)?

Re: Would Oracle use index on count(*)?

From: Konstantin Kivi <konst_at_sirena.rinet.ru>
Date: Tue, 14 Apr 1998 11:19:47 GMT
Message-ID: <ErEI50.3M6.0.debian@sirena.rinet.ru>


aa <aau_at_interlog.com> wrote:
> When I issue an Select count(*) from Table, Oracle always performs a table
> scan even though an index is available. In MS SQL Server, the optimizer will
> chose to scan the index (if one is available) instead of the table. Why
> doesn't Oracle do this?

I think it must be an unique index to be used.

--
Sincerely Yours, Konstantin Kivi, Russia, konst_at_sirena.rinet.ru

    aka <k-kivi_at_usa.net>, 2:5020/457.24_at_fidonet.org           Received on Tue Apr 14 1998 - 06:19:47 CDT

Original text of this message

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