# No index by order by

**URL:** <https://forums.percona.com/t/no-index-by-order-by/1311>\
**Category:** Other MySQL® Questions\
**Created:** [December 18, 2009, 8:18am UTC](https://forums.percona.com/t/no-index-by-order-by/1311 "2009-12-18T08:18:09Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![the\_condor](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/the_condor/32/820_2.png) [@the\_condor](https://forums.percona.com/u/the_condor)\
**Post date:** [December 18, 2009, 8:18am UTC](https://forums.percona.com/t/no-index-by-order-by/1311/1 "2009-12-18T08:18:09Z")

</div>

Hi Friends,

i have some Problems with no index Select \* order by

Sample1

SELECT userid, username, birthday FROM bb2\_users WHERE birthday LIKE ‘%-12-15’ ORDER BY username ASC;

Explain

EXPLAIN SELECT userid, username, birthday FROM bb2\_users WHERE birthday LIKE ‘%-12-15’ ORDER BY username ASC;

RESULT

id select\_type table type possible\_keys key key\_len ref rows Extra1 SIMPLE bb2\_users ALL NULL NULL NULL NULL 8039 Using where; Using filesort

LOG

# User@Host: TEST @ localhost # Query\_time: 0.016334 Lock\_time: 0.000026 Rows\_sent: 5 Rows\_examined: 8038SET timestamp=1260872528;SELECT userid, username, birthday FROM bb2\_users WHERE birthday LIKE ‘%-12-15’ ORDER BY username ASC;

Index set to table birthday and username

Can you help me, I have other questions

---

<div class="post-metadata">

**Author:** ![xaprb](https://avatars.discourse-cdn.com/v4/letter/x/49beb7/32.png) [@xaprb](https://forums.percona.com/u/xaprb)\
**Post date:** [December 18, 2009, 11:21am UTC](https://forums.percona.com/t/no-index-by-order-by/1311/2 "2009-12-18T11:21:39Z")

</div>

I can’t help you because you haven’t actually asked a question. This is my favorite guide on how to ask a question so it’s easy for people to answer: [URL][http://catb.org/~esr/faqs/smart-questions.html[/URL]](http://catb.org/~esr/faqs/smart-questions.html%5B/URL%5D)

---

<div class="post-metadata">

**Author:** ![the\_condor](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/the_condor/32/820_2.png) [@the\_condor](https://forums.percona.com/u/the_condor)\
**Post date:** [December 18, 2009, 11:30am UTC](https://forums.percona.com/t/no-index-by-order-by/1311/3 "2009-12-18T11:30:53Z")

</div>

Hello,

I need help how I can improve my queries. Share index does not work.  
Can I rewrite the query? But how?  
Sorry for my English

the\_condor

---

<div class="post-metadata">

**Author:** ![xaprb](https://avatars.discourse-cdn.com/v4/letter/x/49beb7/32.png) [@xaprb](https://forums.percona.com/u/xaprb)\
**Post date:** [December 18, 2009, 12:24pm UTC](https://forums.percona.com/t/no-index-by-order-by/1311/4 "2009-12-18T12:24:24Z")

</div>

The leading % in your LIKE expression is preventing the index from being used. You should look at the user comments in the MySQL manual, which explain how you can do birthday queries. Look at the page on date and time functions.

---

<div class="post-metadata">

**Author:** ![the\_condor](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/the_condor/32/820_2.png) [@the\_condor](https://forums.percona.com/u/the_condor)\
**Post date:** [December 19, 2009, 12:46am UTC](https://forums.percona.com/t/no-index-by-order-by/1311/5 "2009-12-19T00:46:30Z")

</div>

Hello xaprb,

thank you for the fast Replay, i will look in the Mysql manual.

Here a other Query , no index

mysql-slow.log

# User@Host: FORUM @ localhost # Query\_time: 0.038074 Lock\_time: 0.000040 Rows\_sent: 100 Rows\_examined: 8010SET timestamp=1261154801;SELECT userid, username, email, homepage, regdate, userposts, showemail, usercanemail, receivepm, rankingpoints FROM bb2\_users WHERE rankingpoints ORDER BY rankingpoints ASC LIMIT 0,100;

EXPLAIN

id select\_type table type possible\_keys key key\_len ref rows Extra1 SIMPLE bb2\_users index NULL rankingpoints 8 NULL 100 Using where

possible\_keys = Null  
Key = rankingpoints

Table Structure

CREATE TABLE IF NOT EXISTS `bb2_users` ( `userid` int(11) unsigned NOT NULL AUTO\_INCREMENT, `username` varchar(50) NOT NULL DEFAULT ‘’, `password` varchar(50) NOT NULL DEFAULT ‘’, `sha1_password` varchar(40) NOT NULL DEFAULT ‘’, `email` varchar(150) NOT NULL DEFAULT ‘’, `userposts` mediumint(7) unsigned NOT NULL DEFAULT ‘0’, `groupcombinationid` int(11) unsigned NOT NULL DEFAULT ‘0’, `rankid` int(11) unsigned NOT NULL DEFAULT ‘0’, `title` varchar(50) NOT NULL DEFAULT ‘’, `regdate` int(11) unsigned NOT NULL DEFAULT ‘0’, `lastvisit` int(11) unsigned NOT NULL DEFAULT ‘0’, `lastactivity` int(11) unsigned NOT NULL DEFAULT ‘0’, `usertext` text NOT NULL, `aufgabe` text NOT NULL, `portrait` text NOT NULL, `signature` text NOT NULL, `disablesignature` tinyint(1) NOT NULL DEFAULT ‘0’, `icq` varchar(30) NOT NULL DEFAULT ‘’, `aim` varchar(30) NOT NULL DEFAULT ‘’, `yim` varchar(30) NOT NULL DEFAULT ‘’, `msn` varchar(30) NOT NULL DEFAULT ‘’, `homepage` varchar(250) NOT NULL DEFAULT ‘’, `birthday` date NOT NULL DEFAULT ‘0000-00-00’, `avatarid` int(11) unsigned NOT NULL DEFAULT ‘0’, `gender` tinyint(1) NOT NULL DEFAULT ‘0’, `showemail` tinyint(1) NOT NULL DEFAULT ‘0’, `admincanemail` tinyint(1) NOT NULL DEFAULT ‘1’, `usercanemail` tinyint(1) NOT NULL DEFAULT ‘1’, `invisible` tinyint(1) NOT NULL DEFAULT ‘0’, `usecookies` tinyint(1) NOT NULL DEFAULT ‘1’, `styleid` int(11) unsigned NOT NULL DEFAULT ‘0’, `langid` int(11) NOT NULL DEFAULT ‘0’, `activation` int(11) unsigned NOT NULL DEFAULT ‘0’, `blocked` tinyint(1) NOT NULL DEFAULT ‘0’, `daysprune` smallint(5) unsigned NOT NULL DEFAULT ‘0’, `timezoneoffset` char(3) NOT NULL, `startweek` tinyint(1) NOT NULL DEFAULT ‘0’, `dateformat` varchar(10) NOT NULL DEFAULT ‘’, `timeformat` varchar(10) NOT NULL DEFAULT ‘’, `emailnotify` tinyint(1) NOT NULL DEFAULT ‘0’, `notificationperpm` tinyint(1) NOT NULL DEFAULT ‘0’, `buddylist` text NOT NULL, `ignorelist` text NOT NULL, `receivepm` tinyint(1) NOT NULL DEFAULT ‘1’, `emailonpm` tinyint(1) NOT NULL DEFAULT ‘0’, `pmpopup` tinyint(1) NOT NULL DEFAULT ‘0’, `umaxposts` smallint(5) unsigned NOT NULL DEFAULT ‘0’, `showsignatures` tinyint(1) NOT NULL DEFAULT ‘1’, `showavatars` tinyint(1) NOT NULL DEFAULT ‘1’, `showimages` tinyint(1) NOT NULL DEFAULT ‘1’, `ratingcount` smallint(5) unsigned NOT NULL DEFAULT ‘0’, `ratingpoints` mediumint(7) unsigned NOT NULL DEFAULT ‘0’, `threadview` tinyint(1) NOT NULL DEFAULT ‘0’, `useuseraccess` tinyint(1) NOT NULL DEFAULT ‘0’, `isgroupleader` tinyint(1) NOT NULL DEFAULT ‘0’, `rankgroupid` int(11) NOT NULL DEFAULT ‘0’, `useronlinegroupid` int(11) NOT NULL DEFAULT ‘0’, `allowsigsmilies` tinyint(1) NOT NULL DEFAULT ‘1’, `allowsightml` tinyint(1) NOT NULL DEFAULT ‘0’, `allowsigbbcode` tinyint(1) NOT NULL DEFAULT ‘1’, `allowsigimages` tinyint(1) NOT NULL DEFAULT ‘1’, `emailonapplication` tinyint(1) NOT NULL DEFAULT ‘0’, `acpmode` tinyint(3) NOT NULL DEFAULT ‘1’, `acppersonalmenu` tinyint(1) NOT NULL DEFAULT ‘0’, `acpmenumarkfirst` tinyint(3) NOT NULL DEFAULT ‘0’, `acpmenuhidelast` tinyint(3) NOT NULL DEFAULT ‘0’, `usewysiwyg` tinyint(1) unsigned NOT NULL DEFAULT ‘0’, `useawh` tinyint(3) unsigned NOT NULL DEFAULT ‘1’, `pmtotalcount` int(11) unsigned NOT NULL DEFAULT ‘0’, `pminboxcount` int(11) unsigned NOT NULL DEFAULT ‘0’, `pmnewcount` int(11) unsigned NOT NULL DEFAULT ‘0’, `pmunreadcount` int(11) unsigned NOT NULL DEFAULT ‘0’, `ip_save` varchar(255) NOT NULL, `reg_ipaddress` varchar(15) NOT NULL DEFAULT ‘’, `guthaben` bigint(20) NOT NULL DEFAULT ‘0’, `canedittitle` tinyint(1) NOT NULL DEFAULT ‘0’, `gw_g` int(50) NOT NULL DEFAULT ‘0’, `gw_v` varchar(50) NOT NULL DEFAULT ‘0’, `gut_ava_ba` tinyint(1) NOT NULL DEFAULT ‘0’, `gut_ava_ea` tinyint(1) NOT NULL DEFAULT ‘0’, `Birthday_Bot` varchar(4) NOT NULL DEFAULT ‘’, `loginlog` int(12) NOT NULL DEFAULT ‘0’, `steuerkl` tinyint(1) NOT NULL DEFAULT ‘0’, `hpblock` int(1) NOT NULL DEFAULT ‘0’, `ut` int(1) NOT NULL DEFAULT ‘1’, `acp_userpic` text NOT NULL, `acp_usertext` varchar(75) NOT NULL DEFAULT ‘’, `qreplyview` int(11) NOT NULL DEFAULT ‘0’, `wordmixerstellt` int(7) NOT NULL DEFAULT ‘0’, `wordmixgeloest` int(7) NOT NULL DEFAULT ‘0’, `wmblock` tinyint(1) NOT NULL DEFAULT ‘0’, `adminfield` varchar(250) NOT NULL DEFAULT ‘’, `adminfieldname` varchar(250) NOT NULL DEFAULT ‘’, `firstvisit` int(10) unsigned NOT NULL, `rankingpoints` bigint(20) NOT NULL DEFAULT ‘0’, `regip` varchar(15) NOT NULL DEFAULT ‘000.000.000.000’, `dev_prof` varchar(30) NOT NULL, `useslide` int(11) NOT NULL DEFAULT ‘0’, `is_online` int(11) NOT NULL DEFAULT ‘0’, `last_ping` text NOT NULL, `liga_session` varchar(255) NOT NULL, `wikiview` int(11) NOT NULL DEFAULT ‘1’, `wikiviewhover` int(11) NOT NULL DEFAULT ‘1’, `readrules` int(11) NOT NULL DEFAULT ‘0’, `rss_feeds` text NOT NULL, `rss_time` int(11) NOT NULL, PRIMARY KEY (`userid`), KEY `username` (`username`), KEY `rankid` (`rankid`), KEY `avatarid` (`avatarid`), KEY `activation` (`activation`), KEY `groupcombinationid` (`groupcombinationid`), KEY `reg_ipaddress` (`reg_ipaddress`), KEY `rankingpoints` (`rankingpoints`), KEY `username_2` (`username`), KEY `birthday` (`birthday`), KEY `rankgroupid` (`rankgroupid`), KEY `rankingpoints_2` (`rankingpoints`), KEY `userposts` (`userposts`), KEY `birthday_2` (`birthday`), KEY `username_3` (`username`)) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO\_INCREMENT=14446 ;

what can I do to improve the query.

Thank you and have a nice weekend.

the\_condor

---

<div class="post-metadata">

**Author:** ![gmouse](https://avatars.discourse-cdn.com/v4/letter/g/b9e5f3/32.png) [@gmouse](https://forums.percona.com/u/gmouse)\
**Post date:** [December 19, 2009, 11:32am UTC](https://forums.percona.com/t/no-index-by-order-by/1311/6 "2009-12-19T11:32:49Z")

</div>

remove redundant indices and don’t base your opinion on a single query run.

---

<div class="post-metadata">

**Author:** ![the\_condor](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/the_condor/32/820_2.png) [@the\_condor](https://forums.percona.com/u/the_condor)\
**Post date:** [December 20, 2009, 10:04am UTC](https://forums.percona.com/t/no-index-by-order-by/1311/7 "2009-12-20T10:04:51Z")

</div>

Thank you for Replay gmouse,

i will check this!

Ok here a very hard Query, what can i do for a better Performance?

EXPLAIN SELECT bb2\_threads.topic, bb2\_threads.threadid, bb2\_threads.lastposttime, bb2\_threads.views, bb2\_users.userid, bb2\_threads.boardid AS parentid, bb2\_users.usernameFROM bb2\_threadsLEFT JOIN bb2\_users ON ( bb2\_users.userid = bb2\_threads.lastposterid )LEFT JOIN bb2\_boards ON ( bb2\_boards.boardid = bb2\_threads.boardid )WHERE bb2\_threads.boardidIN ( 0, 34, 313, 312, 314, 334, 320, 331, 324, 325, 326, 327, 328, 329, 330, 335, 336, 338, 339, 120, 317, 192, 185, 190, 199, 206, 234, 332, 333, 337, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 631, 263, 264, 265, 266, 267, 268, 269, 270, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 630, 301, 302, 303, 304, 344, 345, 346, 347, 348, 349, 352, 353, 383, 378, 380, 381, 413, 414, 415, 437, 455, 633, 634, 611, 629, 650, 654, 656, 664, 668, 674, 675, 676, 678, 679, 680, 681, 682, 683, 684, 685 )ORDER BY bb2\_threads.lastposttime DESCLIMIT 5

id select\_type table type possible\_keys key key\_len ref rows Extra1 SIMPLE bb2\_threads range boardid boardid 4 NULL 53294 Using where; Using filesort1 SIMPLE bb2\_users eq\_ref PRIMARY,userid,userid\_2 PRIMARY 4 forum.bb2\_threads.lastposterid 1 1 SIMPLE bb2\_boards eq\_ref PRIMARY,boardid PRIMARY 2 forum.bb2\_threads.boardid 1 Using index

---

<div class="post-metadata">

**Author:** ![gmouse](https://avatars.discourse-cdn.com/v4/letter/g/b9e5f3/32.png) [@gmouse](https://forums.percona.com/u/gmouse)\
**Post date:** [December 20, 2009, 1:30pm UTC](https://forums.percona.com/t/no-index-by-order-by/1311/8 "2009-12-20T13:30:14Z")

</div>

if where is not restrictive, use an index on lastposttime

---

<div class="post-metadata">

**Author:** ![the\_condor](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/the_condor/32/820_2.png) [@the\_condor](https://forums.percona.com/u/the_condor)\
**Post date:** [December 20, 2009, 1:39pm UTC](https://forums.percona.com/t/no-index-by-order-by/1311/9 "2009-12-20T13:39:16Z")

</div>

Hello gmouse,

i have add this index, here the responce!

id select\_type table type possible\_keys key key\_len ref rows Extra1 SIMPLE bb2\_threads index boardid lastposttime 4 NULL 5 Using where1 SIMPLE bb2\_users eq\_ref PRIMARY,userid,userid\_2 PRIMARY 4 forum.bb2\_threads.lastposterid 1 1 SIMPLE bb2\_boards eq\_ref PRIMARY,boardid PRIMARY 2 forum.bb2\_threads.boardid 1 Using index

thats Ok ? or you have a better Query for me.

I have any more bad Querys, here a other one

SELECT MIN(p.postid) AS minpost, MAX(p.postid) AS maxpost, t.threadid, MIN(p.posttime) AS starttime, MAX(p.posttime) AS lastposttime, (COUNT(\*)-1) AS posts FROM bb2\_posts p, bb2\_threads t WHERE t.threadid=p.threadid GROUP BY t.threadid LIMIT 1000, 500

Explain

id select\_type table type possible\_keys key key\_len ref rows Extra1 SIMPLE t index PRIMARY,threadid threadid 3 NULL 23 Using index1 SIMPLE p ref threadid,threadid\_2 threadid 4 forum.t.threadid 8 Using where

mmhhh i need a better Performance Query!! This Query is very slow.

Thank you and have a nice Day

---

<div class="post-metadata">

**Author:** ![gmouse](https://avatars.discourse-cdn.com/v4/letter/g/b9e5f3/32.png) [@gmouse](https://forums.percona.com/u/gmouse)\
**Post date:** [December 21, 2009, 5:26am UTC](https://forums.percona.com/t/no-index-by-order-by/1311/10 "2009-12-21T05:26:00Z")

</div>

don’t use limit with a high offset

---

<div class="post-metadata">

**Author:** ![the\_condor](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/the_condor/32/820_2.png) [@the\_condor](https://forums.percona.com/u/the_condor)\
**Post date:** [December 23, 2009, 12:15pm UTC](https://forums.percona.com/t/no-index-by-order-by/1311/11 "2009-12-23T12:15:22Z")

</div>

Thanks gmouse for the Tips!

I could optimize my database by 10%, thats nice ) )

Here a other Query, thats very Slow and high Rows

EXPLAINSELECTb._, t.topic, t.prefix AS threadprefix, i._, bv.lastvisitFROM bb2\_boards bLEFT JOIN bb2\_threads t ON (t.threadid=b.lastthreadid)LEFT JOIN bb2\_icons i USING (iconid)LEFT JOIN bb2\_boardvisit bv ON (bv.boardid=b.boardid AND bv.userid=‘9865’)ORDER by b.parentid ASC, b.boardorder ASC;

id select\_type table type possible\_keys key key\_len ref rows Extra1 SIMPLE b ALL NULL NULL NULL NULL 172 Using filesort1 SIMPLE t eq\_ref PRIMARY,threadid,threadid\_2 PRIMARY 3 forum.b.lastthreadid 1 1 SIMPLE i eq\_ref PRIMARY PRIMARY 4 forum.t.iconid 1 1 SIMPLE bv eq\_ref PRIMARY,userid PRIMARY 8 forum.b.boardid,const 1

I have Set a Key to boardorder and parentid but without success (  
Do you have a solution for me?

Thank you

the\_condor

---

<div class="post-metadata">

**Author:** ![gmouse](https://avatars.discourse-cdn.com/v4/letter/g/b9e5f3/32.png) [@gmouse](https://forums.percona.com/u/gmouse)\
**Post date:** [December 23, 2009, 6:20pm UTC](https://forums.percona.com/t/no-index-by-order-by/1311/12 "2009-12-23T18:20:35Z")

</div>

make sure you use one multi-column index, use force index if necessary

---

<div class="post-metadata">

**Author:** ![the\_condor](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/the_condor/32/820_2.png) [@the\_condor](https://forums.percona.com/u/the_condor)\
**Post date:** [December 24, 2009, 12:53am UTC](https://forums.percona.com/t/no-index-by-order-by/1311/13 "2009-12-24T00:53:18Z")

</div>

Thanks for the Reply,

I have no idea to change the Query.

FORCE INDEX(KEY) in the Query give me a Error.

the\_condor

P.S Merry Christmas !

---

<div class="post-metadata">

**Author:** ![gmouse](https://avatars.discourse-cdn.com/v4/letter/g/b9e5f3/32.png) [@gmouse](https://forums.percona.com/u/gmouse)\
**Post date:** [December 24, 2009, 7:45am UTC](https://forums.percona.com/t/no-index-by-order-by/1311/14 "2009-12-24T07:45:55Z")

</div>

SELECT  
b._, t.topic, t.prefix AS threadprefix, i._  
, bv.lastvisit  
FROM bb2\_boards b FORCE INDEX(name of index)  
LEFT JOIN bb2\_threads t ON (t.threadid=b.lastthreadid)  
LEFT JOIN bb2\_icons i USING (iconid)  
LEFT JOIN bb2\_boardvisit bv ON (bv.boardid=b.boardid AND bv.userid=‘9865’)  
ORDER by b.parentid ASC, b.boardorder ASC;

sure you have a multi-column index?

MC!

---

<div class="post-metadata">

**Author:** ![the\_condor](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/the_condor/32/820_2.png) [@the\_condor](https://forums.percona.com/u/the_condor)\
**Post date:** [December 24, 2009, 7:55am UTC](https://forums.percona.com/t/no-index-by-order-by/1311/15 "2009-12-24T07:55:36Z")

</div>

I do not know!

here the Create Tab from bb2\_boards

CREATE TABLE IF NOT EXISTS `bb2_boards` ( `boardid` smallint(3) unsigned NOT NULL AUTO\_INCREMENT, `styleid` int(11) unsigned NOT NULL DEFAULT ‘0’, `parentid` int(11) unsigned NOT NULL DEFAULT ‘0’, `parentlist` text NOT NULL, `childlist` text NOT NULL, `boardorder` mediumint(7) unsigned NOT NULL DEFAULT ‘1’, `title` varchar(250) NOT NULL DEFAULT ‘’, `password` varchar(25) NOT NULL DEFAULT ‘’, `description` text NOT NULL, `prefixuse` tinyint(1) NOT NULL DEFAULT ‘0’, `prefixrequired` tinyint(1) NOT NULL DEFAULT ‘0’, `mustuseprefix` tinyint(1) NOT NULL, `prefix` text NOT NULL, `threadtemplateuse` tinyint(1) NOT NULL DEFAULT ‘0’, `threadtemplate` text NOT NULL, `posttemplateuse` tinyint(1) NOT NULL DEFAULT ‘0’, `posttemplate` text NOT NULL, `threadcount` int(11) unsigned NOT NULL DEFAULT ‘0’, `postcount` int(11) unsigned NOT NULL DEFAULT ‘0’, `lastthreadid` int(11) unsigned NOT NULL DEFAULT ‘0’, `lastposttime` int(11) unsigned NOT NULL DEFAULT ‘0’, `lastposterid` int(11) unsigned NOT NULL DEFAULT ‘0’, `lastposter` varchar(50) NOT NULL DEFAULT ‘0’, `allowratings` tinyint(1) NOT NULL DEFAULT ‘1’, `daysprune` smallint(5) unsigned NOT NULL DEFAULT ‘0’, `sortfield` varchar(20) NOT NULL DEFAULT ‘’, `sortorder` varchar(5) NOT NULL DEFAULT ‘’, `threadsperpage` smallint(5) unsigned NOT NULL DEFAULT ‘0’, `postsperpage` smallint(5) unsigned NOT NULL DEFAULT ‘0’, `postorder` tinyint(1) NOT NULL DEFAULT ‘0’, `countuserposts` tinyint(1) NOT NULL DEFAULT ‘1’, `hotthread_reply` smallint(5) unsigned NOT NULL DEFAULT ‘0’, `hotthread_view` smallint(5) unsigned NOT NULL DEFAULT ‘0’, `moderatenew` tinyint(2) NOT NULL DEFAULT ‘0’, `enforcestyle` tinyint(1) NOT NULL DEFAULT ‘0’, `closed` tinyint(1) NOT NULL DEFAULT ‘0’, `isboard` tinyint(1) NOT NULL DEFAULT ‘0’, `invisible` tinyint(1) NOT NULL DEFAULT ‘0’, `showinarchive` tinyint(1) NOT NULL DEFAULT ‘1’, `externalurl` varchar(255) NOT NULL DEFAULT ‘’, `schablone` longtext NOT NULL, `done_field` int(1) NOT NULL DEFAULT ‘0’, `guthaben` tinyint(1) NOT NULL DEFAULT ‘1’, `allowuserrating` int(11) unsigned NOT NULL DEFAULT ‘0’, `merge_disable` int(1) unsigned NOT NULL DEFAULT ‘0’, PRIMARY KEY (`boardid`), KEY `invisible` (`invisible`), KEY `password` (`password`), KEY `boardid` (`boardid`), KEY `externalurl` (`externalurl`), KEY `boardorder` (`boardorder`), KEY `parentid` (`parentid`), KEY `lastthreadid` (`lastthreadid`)) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO\_INCREMENT=700 ;

I’ve tried all, no success (

---

<div class="post-metadata">

**Author:** ![gmouse](https://avatars.discourse-cdn.com/v4/letter/g/b9e5f3/32.png) [@gmouse](https://forums.percona.com/u/gmouse)\
**Post date:** [December 24, 2009, 11:27am UTC](https://forums.percona.com/t/no-index-by-order-by/1311/16 "2009-12-24T11:27:19Z")

</div>

[http://dev.mysql.com/doc/refman/5.0/en/multiple-column-index](http://dev.mysql.com/doc/refman/5.0/en/multiple-column-index) es.html
