Xref: alice comp.databases.oracle.misc:21061
Path: alice!news-feed.fnsi.net!news-a.ais.net!ais.net!news.en.com!cyclone.news.idirect.com!island.idirect.com!tor-nx1.netcom.ca!baron.netcom.net.uk!netcom.net.uk!post.netcom.net.uk!netcom.net.uk!not-for-mail
From: hartleym@netcomuk.co.uk
Newsgroups: comp.databases.oracle.misc
Subject: Re: What to Count - WAS Re: Newbie ? - Howto find nbr records in a table
Date: Sat, 10 Oct 1998 22:45:01 GMT
Organization: (Posted via) Netcom Internet Ltd.
Lines: 9
Message-ID: <361fe2f9.15818043@nntp.netcomuk.co.uk>
References: <361A2ED4.D8B940C6@kscgws00.ksc.nasa.gov> <361A6526.3B04961F@uclink4.berkeley.edu> <6vf80k$5k1$1@schbbs.mot.com> <361bdb16.1049308@news.xs4all.nl> <6vimjg$bcv$1@schbbs.mot.com> <361d116b.7908241@news.xs4all.nl> <qrqT1.223$G84.580268@news14.ispnews.com> <361fd318.776236@news.xs4all.nl>
X-Trace: taliesin.netcom.net.uk 908059574 12328 194.42.230.230 (10 Oct 1998 22:46:14 GMT)
X-Complaints-To: abuse@corp.netcom.net.uk
NNTP-Posting-Date: 10 Oct 1998 22:46:14 GMT
X-Newsreader: Forte Free Agent 1.11/32.235


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.
