Re: Order column in the second table

2014-06-13 Thread Lay András
Hi! On Fri, Jun 13, 2014 at 3:59 AM, yoku ts. yoku0...@gmail.com wrote: Hi, Would you try STRAIGHT_JOIN? mysql56 ALTER TABLE masik DROP KEY idx_test, ADD KEY idx_test(szam, id); Query OK, 0 rows affected (0.08 sec) Records: 0 Duplicates: 0 Warnings: 0 mysql56 EXPLAIN SELECT e.id FROM

Order column in the second table

2014-06-12 Thread Lay András
Hi! I have two tables: CREATE TABLE `egyik` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `duma` varchar(255) NOT NULL, PRIMARY KEY (`id`), KEY `e_idx` (`duma`,`id`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; INSERT INTO `egyik` VALUES (1,'aaa'),(2,'bbb'); CREATE TABLE

Re: Order column in the second table

2014-06-12 Thread Antonio Fernández Pérez
​Hi Lay, If I don't mistake, you can't eliminate Using temporary and Using filesort because you are using an order by. Try the explain again removing order by and check the output. When you use an order by, MySQL needs to use filesort and spends some time sorting the result set. Also, create a

Re: Order column in the second table

2014-06-12 Thread Lay András
| +--+-+---+--+---+---+-+---+--+--+ 2 rows in set (0.00 sec) But i need to order with column in the second table. Bye! Lay -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql

Re: Order column in the second table

2014-06-12 Thread yoku ts.
| |1 | SIMPLE | m | ref | m_idx | m_idx | 4 | test.e.id |1 | Using index | +--+-+---+--+---+---+-+---+--+--+ 2 rows in set (0.00 sec) But i need to order with column