Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: COUNT(*) takes forever
Richard Murphy wrote:
>
> Anyone now what would cause a simple select count(*) to take a very long
> time (hours) on a table of 26 million rows. Other processes on the
> database do not seem to be a problem. This is on Oracle 8 on VMS.
>
> Thanks, R.
Count (*) does a full tablescan. If you have a unique index on the table try count(fieldname) that does an index scan and is usualy much faster
Johnny Verhoeven
Pentasystems
e-commerce software
http://www.pentasystems.com
Received on Thu Feb 04 1999 - 16:18:41 CST