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

Re: Select count(*) in Oracle and MySQL

From: <fitzjarrell_at_cox.net>
Date: Wed, 19 Sep 2007 12:20:55 -0700
Message-ID: <1190229655.930625.13120@50g2000hsm.googlegroups.com>


On Sep 19, 1:40 pm, Occidental <Occiden..._at_comcast.net> wrote:
> 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?

You can compare bananas to prunes, but what is the value? The engines are completely different so how can you make a valid comparison? So MySQL is faster than Oracle on a 'select count(*) from table' query in this instance; so is Access given the proper conditions, but I wouldn't consider Access in the same ballpark, much less the same league, as Oracle. The same is true for MySQL. Yet MySQL is good for websites and light lifting tasks, and other possible uses I cannot think of at the moment. One chooses the proper tool for the job, be it MySQL, Access, SQL Server, Sybase, DB2 or Oracle. I wouldn't normally use a hammer to drive screws, and I certainly wouldn't use a screwdriver to pound nails, so comparing a hammer to a screwdriver is silly.

You're simply fishing for a flame war; I'll not give it to you. Go troll elsewhere for your fight.

David Fitzjarrell Received on Wed Sep 19 2007 - 14:20:55 CDT

Original text of this message

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