Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Select count(*) in Oracle and MySQL
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
![]() |
![]() |