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 -> Select count(*) in Oracle and MySQL

Select count(*) in Oracle and MySQL

From: Occidental <Occidental_at_comcast.net>
Date: Wed, 19 Sep 2007 11:40:21 -0700
Message-ID: <1190227221.320339.178380@50g2000hsm.googlegroups.com>


I have a table with about 250M rows, implemented in both Oracle and MySQL.
Select count(*) in MySQL is effectively instantaneous, presumably because it accesses some internal count that is maintained by the DBMS. The same query in Oracle takes about 6 minutes, pretty obviously becasue it counts rows. The Oracle table should have been set up with a primary key, but wasn't. The MySQL table has no primary key either. Any comments? Received on Wed Sep 19 2007 - 13:40:21 CDT

Original text of this message

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