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. 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 masik m

Re: Order column in the second table

2014-06-12 Thread yoku ts.
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 masik m STRAIGHT_JOIN egyik e ON e.id= m.id WHERE e.duma= 'aaa' ORDER BY m.szam

Re: Order column in the second table

2014-06-12 Thread Lay András
Hi! On Thu, Jun 12, 2014 at 1:36 PM, Antonio Fernández Pérez wrote: > 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. Thank you, I know, without orde

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