isamchk order_stats Checking ISAM file: order_stats Data records: 264282 Deleted blocks: 0 - check file-size - check delete-chain - check index reference - check data record references index: 1 - check data record references index: 2 - check data record references index: 3 - check record links mysql> select count(oid) from order_stats where aff=1 and made>'2001-03-08' and step=5; +------------+ | count(oid) | +------------+ | 194 | +------------+ 1 row in set (0.25 sec) mysql> select count(oid) from order_stats where aff=1 and made>'2001-02-08' and step=5; +------------+ | count(oid) | +------------+ | 0 | +------------+ 1 row in set (0.40 sec) mysql> explain select count(oid) from order_stats where aff=1 and made>'2001-02-08' and step=5; +-------------+------+---------------+------+---------+------+------+------------+ | table | type | possible_keys | key | key_len | ref | rows | Extra | +-------------+------+---------------+------+---------+------+------+------------+ | order_stats | ref | affn | affn | 4 | ??? | 2642 | where used | +-------------+------+---------------+------+---------+------+------+------------+ 1 row in set (0.00 sec) mysql> explain select count(oid) from order_stats where aff=1 and made>'2001-03-08' and step=5; +-------------+-------+---------------+------+---------+------+------+-------+ | table | type | possible_keys | key | key_len | ref | rows | Extra | +-------------+-------+---------------+------+---------+------+------+-------+ | order_stats | range | affn | affn | NULL | NULL | 2504 | | +-------------+-------+---------------+------+---------+------+------+-------+ 1 row in set (0.01 sec) mysql> show keys from order_stats; +-------------+------------+----------+--------------+-------------+-----------+-------------+----------+ | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | |Cardinality | Sub_part | +-------------+------------+----------+--------------+-------------+-----------+-------------+----------+ | order_stats | 0 | PRIMARY | 1 | sid | A | |264273 | NULL | | order_stats | 1 | oidn | 1 | oid | A | | NULL | NULL | | order_stats | 1 | affn | 1 | aff | A | | NULL | NULL | | order_stats | 1 | affn | 2 | made | A | | NULL | NULL | | order_stats | 1 | affn | 3 | step | A | | NULL | NULL | +-------------+------------+----------+--------------+-------------+-----------+-------------+----------+ 5 rows in set (0.00 sec) This is bogus!!, and incredibly frustrating when trying to debug the behaviour in situ on a live server. What does '???' refer to in the 'ref' column? How can the SQL server get things so fundamentally wrong and not report any error? As with my previous posts to this list, this is the mysqld binary from mysql.com, latest release of the 3.22 server.. thanks -Justin --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php