Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Finding total Rows without count() ?
I've long suspected that
select count(*) from t;
is the same (in terms of process as well as result) as
select max(rownum) from t;
Is this correct?
fumi <fumi_at_tpts5.seed.net.tw> wrote in message
news:83b0ef$qb4$4_at_news.seed.net.tw...
> Using count(*) just needs to count the row headers,
> but using count('x') must count the row header, then performs 'x' for each
row.
>
> So, count(*) takes less CPU, less memory usage, less time
> than count('x') or count(1) or count(rowid).
>
>
>
>
Received on Thu Dec 16 1999 - 11:09:34 CST