MySQL Forums
Forum List  »  General

Re: Wrong count(*)
Posted by: larry
Date: November 16, 2005 05:05AM

mysql> SELECT COUNT(*) FROM vote IGNORE INDEX (model_2) WHERE model=49;
+----------+
| COUNT(*) |
+----------+
| 4 |
+----------+
1 row in set (0.04 sec)

mysql> SELECT COUNT(id) FROM vote IGNORE INDEX (model_2) WHERE model=49;
+-----------+
| COUNT(id) |
+-----------+
| 4 |
+-----------+
1 row in set (0.00 sec)

mysql>

Dump: http://83.142.27.226/vote.dump

So the problem seems to be with index handling. First there was another index model on field model, but, as I got from docs, it is not needed as mysql can use beginning of composite (forgot correct word) index.
Excuse my english, I write much worse, than read :(



Edited 1 time(s). Last edit at 11/16/2005 05:10AM by larry.

Options: ReplyQuote


Subject
Written By
Posted
November 15, 2005 07:19AM
November 16, 2005 04:18AM
November 16, 2005 04:54AM
Re: Wrong count(*)
November 16, 2005 05:05AM
November 16, 2005 05:19AM
November 16, 2005 06:44AM
November 16, 2005 12:59PM
April 12, 2006 01:48PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.