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: Jim Morgan <jimmorgan_at_csi.com>
Date: Tue, 14 Apr 1998 09:44:18 -0400
Message-ID: <6gvp53$ts2$1@rtpnews.raleigh.ibm.com>


I saw this thread late, but I ran into this once before and was wondering why count(*) took so long. I tried count(colname) but that performed just as poorly. It kind of makes sense that count(primarykey) would use the index and thus perform much better, but what if you had a compound primary key?

Is there such a thing as count(col1, col2, col3) where col1, col2 and col3 make up a composite primary key?

Also, I imagine the discussion of count(column) using an index holds true whether you're talking about a primary key or ANY index. True?

--
Regards,
Jim Received on Tue Apr 14 1998 - 08:44:18 CDT

Original text of this message

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