Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: What to Count - WAS Re: Newbie ? - Howto find nbr records in a table
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