Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> count(*)
Hi. What affects the execution speed of count(*):
SQL> select count(*) from table_a;
COUNT(*)
382784
Elapsed: 00:00:00.28
SQL> select count(*) from table_b;
COUNT(*)
382648
Elapsed: 00:00:05.40
The tables have a similar amount of rows, yet the count on table_b is noticably slower than the count on table_a.
-- Morten Primdahl Caput A/S Phone +45 70 12 24 42 System Integrator Nygade 6 Fax +45 70 11 24 42 morten@caput.com DK-1164 Kbh K http://www.caput.com/Received on Mon Apr 08 2002 - 03:06:11 CDT