Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: count of rows without select count(*) command...

Re: count of rows without select count(*) command...

From: <ajayanand_at_my-dejanews.com>
Date: Mon, 16 Nov 1998 21:18:49 GMT
Message-ID: <72q4rp$5lk$1@nnrp1.dejanews.com>


For better performance, Count(*) should not be used because the Oracle must first resolve all column names in the table which is a step that may not be required if ur just counting rows.

Generally select count(indexed column) and select count(rowid) are faster.

You may want to see the comparative performance by running:

Select count(*), select count(1), select count(indexed column) and select count (rowid) to see the difference.

Let me know if u need any other info.

HTH. In article <72it24$mfk$1_at_front1.grolier.fr>,   "BluesMan" <ygrenet_at_club-internet.fr> wrote:
> Hi all,
>
> I have a table with near 150 M rows (12Go)...
>
> ...How could I know the number of rows without the ' select count(*) from
> table_name ' command ?
> for instance in the system tables...
>
> no statistics are launched...
>
> Thanks
>
> gotblues_at_mygale.org
>
>

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Mon Nov 16 1998 - 15:18:49 CST

Original text of this message

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