Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Finding total Rows without count() ?
Hello
Here are some test run on a Sun 3500 :
09:35:40 SQL> select count(*) from parameter ;
COUNT(*)
5767134
Elapsed: 00:00:16.37
SQL> select count(1) from parameter ;
COUNT(1)
5767286
Elapsed: 00:00:17.77
SQL> select count(rownum) from parameter ;
COUNT(ROWNUM)
5767323
Elapsed: 00:00:33.37
SQL> select max(rownum) from parameter ;
MAX(ROWNUM)
5767607
Elapsed: 00:00:34.26
SQL> select count(rowid) from parameter ;
COUNT(ROWID)
5767539
Elapsed: 00:00:21.09
SQL> analyze table parameter estimate statistics ;
Table analyzed.
Elapsed: 00:00:10.27
So the quickest way seems to be the analyze table, Shortly followed by select(1).
B. Polarski
www.geocities.com/bpolarsk
bpolarsk_at_yahoo.com
Elapsed: 00:00:21.09
SQL> select max(rownum) from parameter ;
MAX(ROWNUM)
5767607
Elapsed: 00:00:34.26
![]() |
![]() |