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: Finding total Rows without count() ?

Re: Finding total Rows without count() ?

From: Alan Shein <alanshein_at_erols.com>
Date: Thu, 16 Dec 1999 12:09:34 -0500
Message-ID: <83b6cg$h0d$1@bob.news.rcn.net>


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

Original text of this message

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