tag:blogger.com,1999:blog-5113647.post5760564763520630499..comments2024-03-19T23:55:28.500-07:00Comments on Some thoughts on your (and my) thoughts.: SQL Query Execution Optimization opportunities missed: Part-1Dhruv Matanihttp://www.blogger.com/profile/09979424322533140869noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-5113647.post-60931745295052346572012-08-03T09:33:26.892-07:002012-08-03T09:33:26.892-07:00> You know of any DB which provide these featur...> You know of any DB which provide these features <br />> with their indexes or is it a new proposal.<br /><br />This is a new proposal.<br /><br />> Is this what you have doing in Fb, if of course it <br />> is not confidential :P.<br /><br />All opinions mentioned on this blog are my own, and not of my employers. Further, I can neither confirm nor deny that :-p<br /><br />> BTW is it not true that MySQL creates a temporary table for <br />> order by clause? What about other Db's? <br /><br />MySql is quite a dumb SQL execution engine, and is not able to perform many optimizations. For example, if you do a group by with an order by (even on a proper prefix of the same field), it will use filesort and a temporary even thought it doesn't need to if the column you are trying to sort & group by is already indexed. See <a href="http://dev.mysql.com/doc/refman/5.1/en/internal-temporary-tables.html" rel="nofollow">this page on how MySql uses internal temporary tables</a> for an enumerated set of situations where MySql may use a temporary table.Dhruv Matanihttps://www.blogger.com/profile/09979424322533140869noreply@blogger.comtag:blogger.com,1999:blog-5113647.post-53318512380959327292012-08-03T03:57:11.876-07:002012-08-03T03:57:11.876-07:00You know of any DB which provide these features wi...You know of any DB which provide these features with their indexes or is it a new proposal. Is this what you have doing in Fb, if of course it is not confidential :P.<br /><br />BTW is it not true that MySQL creates a temporary table for order by clause? What about other Db's?nomindhttps://www.blogger.com/profile/05944558682639627552noreply@blogger.com