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 `m
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
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
I would love to know the answer to this as well.
I know there are a number of functions of mysqlcheck...
-c to check for corruption.. and ensure nothing needs to be repaired
-o to Optimize, which is kind of like defragmenting, removing deleted rows..
and this may be the one that is causing the 1
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
Start Here to analyze your tables
Martin Gainty
__
_ _ _ _ _ ___ _
_ _ _ _
|_ _| |_ ___ | _ |___ ___ ___| |_ ___ | __|___| _| |_ _ _ _ __
I would recommend start Here to analyze your tables:
http://dev.mysql.com/doc/refman/5.1/en/analyze-table.html
Once you have evidence of FTS or unbalanced index entries then optimise
http://dev.mysql.com/doc/refman/5.1/en/optimize-table.html
Martin Gainty