Hi,
I've tried an EXPLAIN of the SELECT below.
Please can anyone tell me why it's
"Impossible WHERE noticed after reading const tables"
?
I've droped and created the table - but the error/message occurs.
When I leave '(chetPosition = 1)' away, it works!
A bug or ???
The statement works without explain!
Thx a lot,
Robert
MySql 3.23.49
mysql> explain
-> SELECT * FROM hmChartEntry
-> WHERE (ctId = 1) AND
-> (chSubId = 1) AND
-> (chetPosition = 1)
-> ;
+-----------------------------------------------------+
| Comment |
+-----------------------------------------------------+
| Impossible WHERE noticed after reading const tables |
+-----------------------------------------------------+
1 row in set (0.00 sec)
mysql> desc hmChartEntry;
+------------------+-----------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------------+-----------------------+------+-----+---------+-------+
| ctId | mediumint(8) unsigned | | PRI | 0 | |
| chSubId | tinyint(3) unsigned | | PRI | 1 | |
| chetPosition | tinyint(3) unsigned | | PRI | 0 | |
| chetArtist | varchar(50) | YES | | NULL | |
| chetTitle | varchar(80) | YES | | NULL | |
| chetLabel | varchar(30) | YES | | NULL | |
| coIdLabel | char(2) | YES | | NULL | |
| chetDoLabelCheck | char(1) | | | Y | |
| ctIdLabel | mediumint(8) unsigned | YES | | NULL | |
+------------------+-----------------------+------+-----+---------+-------+
9 rows in set (0.00 sec)
mysql>
mysql> show index from hmChartEntry;
+--------------+------------+----------+--------------+--------------+------
-----+-------------+----------+--------+----
-----+
| Table | Non_unique | Key_name | Seq_in_index | Column_name |
Collation | Cardinality | Sub_part | Packed | Com
ment |
+--------------+------------+----------+--------------+--------------+------
-----+-------------+----------+--------+----
-----+
| hmChartEntry | 0 | PRIMARY | 1 | ctId | A
| 67 | NULL | NULL |
|
| hmChartEntry | 0 | PRIMARY | 2 | chSubId | A
| 71 | NULL | NULL |
|
| hmChartEntry | 0 | PRIMARY | 3 | chetPosition | A
| 1208 | NULL | NULL |
|
+--------------+------------+----------+--------------+--------------+------
-----+-------------+----------+--------+----
-----+
3 rows in set (0.00 sec)
mysql>
---------------------------------------------------------------------
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