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: fumi <fumi_at_tpts5.seed.net.tw>
Date: 16 Dec 1999 15:28:15 GMT
Message-ID: <83b0ef$qb4$4@news.seed.net.tw>

Kurt Harless <kharless_at_styl.com> wrote in message news:838cqr$h9k$1_at_nnrp03.primenet.com...
> Note...
>
> Instead of doing a count(*) use count('x'), or any literal, this prevents
> the parser from having to determine the columns for the query. This speeds
> up count a bit.
>
> Kurt

No!
It's one of the most prevalent misconceptions. 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 - 09:28:15 CST

Original text of this message

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