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: Data Cruncher <dcruncher4_at_aim.com>
Date: Wed, 19 Sep 2007 18:01:05 -0700
Message-ID: <1190250065.310741.26870@n39g2000hsh.googlegroups.com>


On Sep 19, 5:38 pm, Serge Rielau <srie..._at_ca.ibm.com> wrote:

> So, yes, the behavior is normal and it is intended. The solution for you
> is to create an index. You will find the same behavior in DB2, IDS and
> very likely SQL Server. If I had to take a guess I'd also include
> Postgress in that list...

By IDS do you mean Informix. Then you are wrong. Informix, like mysql, maintains the count of rows in the tablespace tablespace. Apparently it needs that for fragmented tables by round robin for even distribution of rows into different partitions. However the same info is available for non fragmented table also. Hence almost instantaneous response for select count(*) regardless of the size of the table.

However as mentioned by many, this feature is hardly of any use. Received on Wed Sep 19 2007 - 20:01:05 CDT

Original text of this message

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