Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: What to Count - WAS Re: Newbie ? - Howto find nbr records in a table

Re: What to Count - WAS Re: Newbie ? - Howto find nbr records in a table

From: <hartleym_at_netcomuk.co.uk>
Date: Sat, 10 Oct 1998 22:45:01 GMT
Message-ID: <361fe2f9.15818043@nntp.netcomuk.co.uk>

select count(*) from table;

this is best, it allows the oracle optimizer to chose the most selective index, and hence reduce any I/O as necessary.

What the internal logic counts is irrelevant, why count rowid, when all that is needed is to increment a counter each time the search condition is true. Received on Sat Oct 10 1998 - 17:45:01 CDT

Original text of this message

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