MySQL Forums
Forum List  »  Newbie

Re: why my db don't use index?
Posted by: Keith Larson
Date: July 13, 2013 09:14PM

Well not sure what version you are running but you can do this in InnODB as well with MySQL 5.6.

If you run Explain EXTENDED SELECT ueberschrift ......

you will then see the filtered column.
More on that can be found here http://dev.mysql.com/doc/refman/5.1/en/explain-output.html#explain_filtered

You can add a key to the table for kat.
KEY `kat` (`kat`)

You can force that index FROM artikel_Mode FORCE INDEX(kat) WHERE
You of course would have to run explains on those to see if it actually helped compared to your original.

But first... Why is kat varchar if you have all INT in it?
`kat` varchar(12) NOT NULL, why not `kat` int(10) DEFAULT 0,
ALTER TABLE artikel_Mode CHANGE kat `kat` int(10) DEFAULT 0;

Just trying to help....

http://anothermysqldba.blogspot.com

Options: ReplyQuote


Subject
Written By
Posted
Re: why my db don't use index?
July 13, 2013 09:14PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.