MySQL Forums
Forum List  »  Optimizer & Parser

Re: Subquery with range uses filesort
Posted by: Rick James
Date: November 19, 2013 04:10PM

But is the filesort really hurting performance?
A "filesort" may happen in RAM, not really on disk. But these two things:
> select * from Player
> `PlayerPassword` tinyblob NOT NULL,
conspire to force the temp table to be on disk. There are several rules covering when a temp table is MEMORY vs MyISAM. One of them is the existence of a BLOB field. (I did not spot anything else that would force disk.)

Are you fetching info about _one_ player? Or several players?
If you are looking at only a single player, then it is fairly easy to use a subquery (perhaps like the one I suggested). Fetching "the last ..." for several players in a single query is more complex.

Options: ReplyQuote


Subject
Views
Written By
Posted
4417
November 16, 2013 02:42PM
1544
November 17, 2013 07:42PM
1557
November 17, 2013 08:01PM
1570
November 18, 2013 04:33PM
2096
November 18, 2013 07:54PM
Re: Subquery with range uses filesort
1783
November 19, 2013 04:10PM
1668
November 19, 2013 08:36PM
1735
November 21, 2013 02:55PM
1943
December 05, 2013 03:46PM
1576
December 07, 2013 02:10PM
1547
December 09, 2013 06:08PM
1637
December 14, 2013 09:51PM
1510
December 14, 2013 10:17PM
1587
December 15, 2013 11:29PM
1671
December 17, 2013 06:58PM
1590
December 18, 2013 05:49PM
1636
December 18, 2013 08:28PM
1650
December 19, 2013 10:13PM
1627
December 19, 2013 10:28PM
1480
December 20, 2013 07:06PM
1573
December 21, 2013 07:36AM
1611
December 22, 2013 10:01AM
1669
December 22, 2013 10:45AM
1570
December 25, 2013 09:30PM


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.