Hi
Can somebody tell me what is wrong up here?
I have a table with around .1 million rows and structure like:
benchmarks | CREATE TABLE `benchmarks` (
`name` varchar(50) NOT NULL default '',
`logic` varchar(50) NOT NULL default '',
`status` varchar(50) NOT NULL default '',
`difficulty` int(11) NOT NULL default '0',
`xmldata` longblob,
KEY `name` (`name`),
KEY `logic` (`logic`,`status`,`difficulty`),
KEY `status` (`status`,`difficulty`),
KEY `difficulty` (`difficulty`),
KEY `logic_2` (`logic`,`difficulty`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
A query like the following returns result
ysql> select name from benchmarks where logic = 'QF_IDL' and status = 'sat' limit 10;
+-----------------+
| name |
+-----------------+
| B_2ba |
| abz5_900 |
| ring2_100 |
| ring2_10 |
| RailRoad1_neg_2 |
| RailRoad1_neg_3 |
| RailRoad1_neg_4 |
| RailRoad_neg_0 |
| RailRoad_neg_2 |
| FISCHER1_2_ninc |
+-----------------+
10 rows in set (0.00 sec)
which is correct.
But this query seems to be returning wrong data or maybe my query is wrong.
mysql> select name from benchmarks where logic = 'QF_IDL' and status = 'sat' order by 1 limit 10;
+---------------------------+
| name |
+---------------------------+
| abz5_900 |
| abz5_900 |
| BinarySearch_live_bgmc000 |
| BinarySearch_live_bgmc000 |
| BinarySearch_live_bgmc002 |
| BinarySearch_live_bgmc002 |
| BinarySearch_live_blmc000 |
| BinarySearch_live_blmc000 |
| BinarySearch_safe_bgmc001 |
| BinarySearch_safe_bgmc001 |
+---------------------------+
10 rows in set (2.42 sec)
:eek: :eek:
Although I can confirm that the data in name column are unique so there is never two rows with the same name.
Also the second query seems to be taking too much time?
What am I doing wrong?