<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>20bits - Latest Comments in 10 Tips for Optimizing MySQL Queries (That don&amp;#8217;t suck) | 20bits</title><link>http://20bits.disqus.com/</link><description></description><language>en</language><lastBuildDate>Wed, 09 Dec 2009 14:01:30 -0000</lastBuildDate><item><title>Re: 10 Tips for Optimizing MySQL Queries (That don&amp;#8217;t suck) | 20bits</title><link>http://20bits.com/articles/10-tips-for-optimizing-mysql-queries-that-dont-suck/#comment-25314616</link><description>Interesting thoughts well expressed.&lt;br&gt;For more jobs visit  &lt;a href="http://www.staffingpower.com" rel="nofollow"&gt;http://www.staffingpower.com&lt;/a&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">staffing555</dc:creator><pubDate>Wed, 09 Dec 2009 14:01:30 -0000</pubDate></item><item><title>Re: 10 Tips for Optimizing MySQL Queries (That don&amp;#8217;t suck) | 20bits</title><link>http://20bits.com/articles/10-tips-for-optimizing-mysql-queries-that-dont-suck/#comment-24022667</link><description>Yo.. Thanks</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">santoshb</dc:creator><pubDate>Wed, 25 Nov 2009 05:11:50 -0000</pubDate></item><item><title>Re: 10 Tips for Optimizing MySQL Queries (That don&amp;#8217;t suck) | 20bits</title><link>http://20bits.com/articles/10-tips-for-optimizing-mysql-queries-that-dont-suck/#comment-17113806</link><description>I got some of mysql optimiztion tips from here.&lt;br&gt;Is it correct?&lt;br&gt;&lt;br&gt;I have tried some of them and feel good but few of them were give me good sound &lt;br&gt;Please give your feedback&lt;br&gt;&lt;a href="http://cookphp.blogspot.com/2009/09/top-100-performance-tips-of-mysql-query.html" rel="nofollow"&gt;http://cookphp.blogspot.com/2009/09/top-100-per...&lt;/a&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">joypt</dc:creator><pubDate>Tue, 22 Sep 2009 09:18:48 -0000</pubDate></item><item><title>Re: 10 Tips for Optimizing MySQL Queries (That don&amp;#8217;t suck) | 20bits</title><link>http://20bits.com/articles/10-tips-for-optimizing-mysql-queries-that-dont-suck/#comment-14626761</link><description>cool article, just keep your database strucutre logical and simple, like a real library and everything will fall in to place.&lt;br&gt;&lt;br&gt;cheers,&lt;br&gt;&lt;br&gt;&lt;a href="http://www.skycards.eu" rel="nofollow"&gt;sky cards&lt;/a&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sky cards</dc:creator><pubDate>Tue, 11 Aug 2009 07:44:25 -0000</pubDate></item><item><title>Re: 10 Tips for Optimizing MySQL Queries (That don&amp;#8217;t suck) | 20bits</title><link>http://20bits.com/articles/10-tips-for-optimizing-mysql-queries-that-dont-suck/#comment-13972144</link><description>Excellent article and well-written. Glad I found this gem relatively early in my MySQL career!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jamie Dexter</dc:creator><pubDate>Wed, 05 Aug 2009 07:26:13 -0000</pubDate></item><item><title>Re: 10 Tips for Optimizing MySQL Queries (That don&amp;#8217;t suck) | 20bits</title><link>http://20bits.com/articles/10-tips-for-optimizing-mysql-queries-that-dont-suck/#comment-13476699</link><description>Thank you a lot for the tips.&lt;br&gt;Please how can I introduce optimization algorithm in mysql.&lt;br&gt;The will help me to complete my thesis.&lt;br&gt;&lt;br&gt;Thanks.&lt;br&gt;&lt;br&gt;Sincerely,&lt;br&gt;&lt;br&gt;Bright Emeka</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">brightemeka</dc:creator><pubDate>Tue, 28 Jul 2009 15:07:25 -0000</pubDate></item><item><title>Re: 10 Tips for Optimizing MySQL Queries (That don&amp;#8217;t suck) | 20bits</title><link>http://20bits.com/articles/10-tips-for-optimizing-mysql-queries-that-dont-suck/#comment-13001926</link><description>Great article, very useful insights!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">farinspace</dc:creator><pubDate>Tue, 21 Jul 2009 12:10:21 -0000</pubDate></item><item><title>Re: 10 Tips for Optimizing MySQL Queries (That don&amp;#8217;t suck) | 20bits</title><link>http://20bits.com/articles/10-tips-for-optimizing-mysql-queries-that-dont-suck/#comment-11705390</link><description>Cool, Thanks!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Nick Yeoman</dc:creator><pubDate>Wed, 24 Jun 2009 19:11:09 -0000</pubDate></item><item><title>Re: 10 Tips for Optimizing MySQL Queries (That don&amp;#8217;t suck) | 20bits</title><link>http://20bits.com/articles/10-tips-for-optimizing-mysql-queries-that-dont-suck/#comment-9192879</link><description>I liked a lot your post but wish to as one question, about a problem I need to solve.&lt;br&gt;I am facing a situation wher I have to query a database for the countries names, then, when a client select a country, I show the states (regions) of this country and, finally, when he selects one of these regions, I need to show all the cities of this region.&lt;br&gt;I ask:&lt;br&gt;What should I use: &lt;br&gt;one table for the countries with countries names and countries codes;&lt;br&gt;one table for the regions with regions names and codes, for each country;&lt;br&gt;one table for the cities for that country.&lt;br&gt;or, it's best to have only one table with all that data and perform all queries in that table (more than 2,000,000 records)?&lt;br&gt;&lt;br&gt;Thanks</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sergio</dc:creator><pubDate>Sun, 10 May 2009 20:47:57 -0000</pubDate></item><item><title>Re: 10 Tips for Optimizing MySQL Queries (That don&amp;#8217;t suck) | 20bits</title><link>http://20bits.com/articles/10-tips-for-optimizing-mysql-queries-that-dont-suck/#comment-8688601</link><description>good post. One way I find make a big difference is using group by rather than distinct when it's possible</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Henry</dc:creator><pubDate>Sat, 25 Apr 2009 14:35:17 -0000</pubDate></item><item><title>Re: 10 Tips for Optimizing MySQL Queries (That don&amp;#8217;t suck) | 20bits</title><link>http://20bits.com/articles/10-tips-for-optimizing-mysql-queries-that-dont-suck/#comment-5828337</link><description>Great article.  I'm trying to take my MySql skills to the next level and this is the kind of stuff I want to learn.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Nate</dc:creator><pubDate>Tue, 03 Feb 2009 23:49:44 -0000</pubDate></item><item><title>Re: 10 Tips for Optimizing MySQL Queries (That don&amp;#8217;t suck) | 20bits</title><link>http://20bits.com/articles/10-tips-for-optimizing-mysql-queries-that-dont-suck/#comment-5070742</link><description>Thanks for your list! Also, I was so free to do my own post on some basic and advanced mysql tuning tips!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Zen of Linux</dc:creator><pubDate>Mon, 12 Jan 2009 06:04:59 -0000</pubDate></item><item><title>Re: 10 Tips for Optimizing MySQL Queries (That don&amp;#8217;t suck) | 20bits</title><link>http://20bits.com/articles/10-tips-for-optimizing-mysql-queries-that-dont-suck/#comment-3793244</link><description>Angsuman,&lt;br&gt;&lt;br&gt;Cool.  I'll check it out.&lt;br&gt;&lt;br&gt;As for the ORM stuff, I know, but I don't care that much.  My interests skew towards large, denormalized data storage, anyhow.  Building the next great Rails app ain't my thing.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jesse</dc:creator><pubDate>Thu, 16 Oct 2008 16:57:31 -0000</pubDate></item><item><title>Re: 10 Tips for Optimizing MySQL Queries (That don&amp;#8217;t suck) | 20bits</title><link>http://20bits.com/articles/10-tips-for-optimizing-mysql-queries-that-dont-suck/#comment-3793239</link><description>Nice tips. I too have written some tips in not so recent past on my blog covering how to handle frequent inserts on a database maximized for reading like a blog using MyISAM.&lt;br&gt;BTW: Your tip on eliminating artificial primary key has issues with most ORM frameworks like Hibernate.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">angsuman</dc:creator><pubDate>Tue, 09 Sep 2008 12:18:43 -0000</pubDate></item><item><title>Re: 10 Tips for Optimizing MySQL Queries (That don&amp;#8217;t suck) | 20bits</title><link>http://20bits.com/articles/10-tips-for-optimizing-mysql-queries-that-dont-suck/#comment-3793238</link><description>great tips!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Werner</dc:creator><pubDate>Mon, 08 Sep 2008 12:44:28 -0000</pubDate></item><item><title>Re: 10 Tips for Optimizing MySQL Queries (That don&amp;#8217;t suck) | 20bits</title><link>http://20bits.com/articles/10-tips-for-optimizing-mysql-queries-that-dont-suck/#comment-3793242</link><description>Thanks for the list. Great perspective.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Calgary Web Design</dc:creator><pubDate>Thu, 28 Aug 2008 12:59:56 -0000</pubDate></item><item><title>Re: 10 Tips for Optimizing MySQL Queries (That don&amp;#8217;t suck) | 20bits</title><link>http://20bits.com/articles/10-tips-for-optimizing-mysql-queries-that-dont-suck/#comment-3793241</link><description>Hey Jesse-- I just wanted to let you know that I've been doing a fair deal of schema-ing (and scheming) at my new job and I've been using this article like a bible and sharing it with my colleagues. Thanks! ^^</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mitcho</dc:creator><pubDate>Tue, 26 Aug 2008 02:11:42 -0000</pubDate></item><item><title>Re: 10 Tips for Optimizing MySQL Queries (That don&amp;#8217;t suck) | 20bits</title><link>http://20bits.com/articles/10-tips-for-optimizing-mysql-queries-that-dont-suck/#comment-3793245</link><description>These are some fantastic tips, thanks man!&lt;br&gt;Just ordered myself a copy of the book High Performance MySQL (Arjen Lentz, Peter Zaitsev, Vadim Tkachenko), can't wait, working on a project that needs massive amounts of data output from MySQL and it seems I'll be using this new knowledge to save the company from having to buy bigger servers.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Re@PeR</dc:creator><pubDate>Tue, 29 Jul 2008 05:15:07 -0000</pubDate></item><item><title>Re: 10 Tips for Optimizing MySQL Queries (That don&amp;#8217;t suck) | 20bits</title><link>http://20bits.com/articles/10-tips-for-optimizing-mysql-queries-that-dont-suck/#comment-3793237</link><description>I know the post is like a year old. But I think that it is the single best post on mysql optimization.&lt;br&gt;Concise and to the point and practical. Good job.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">paan</dc:creator><pubDate>Tue, 08 Jul 2008 02:14:51 -0000</pubDate></item><item><title>Re: 10 Tips for Optimizing MySQL Queries (That don&amp;#8217;t suck) | 20bits</title><link>http://20bits.com/articles/10-tips-for-optimizing-mysql-queries-that-dont-suck/#comment-3793243</link><description>Hello, How write sql query for mysql, selet top 10 ?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Hoteles Mar del Plata</dc:creator><pubDate>Fri, 04 Jul 2008 11:12:09 -0000</pubDate></item><item><title>Re: 10 Tips for Optimizing MySQL Queries (That don&amp;#8217;t suck) | 20bits</title><link>http://20bits.com/articles/10-tips-for-optimizing-mysql-queries-that-dont-suck/#comment-3793240</link><description>I've read a lot of the "MySQL" Optimization guides and yours is the best so far as a single post. Most of them have gone over "Indexing" or totally skewed the guide you end up screwing yourself. &lt;br&gt;&lt;br&gt;I use parenthesis when I'm trying to do two compares on a column ie: (`date` &amp;gt;= 'xxxx' AND `date` &amp;lt;= 'yyyy'). Just make me feel comfortable with grouping it like that.&lt;br&gt;&lt;br&gt;As for the other things - I think you have given me a lot of stuff to help me in my job that I start in 2 weeks. I leave the current job tomorrow (friday), where even I know my read calls are really quick, but i can see it being at least 2x faster with these tips.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ellisgl</dc:creator><pubDate>Thu, 08 May 2008 21:21:42 -0000</pubDate></item><item><title>Re: 10 Tips for Optimizing MySQL Queries (That don&amp;#8217;t suck) | 20bits</title><link>http://20bits.com/articles/10-tips-for-optimizing-mysql-queries-that-dont-suck/#comment-3793236</link><description>ken,&lt;br&gt;&lt;br&gt;Yeah.  I don't know what version what around when I wrote this article -- but that was 11 months ago.  It'd also be unfortunate if Rails flipped out by default (i.e., required :id =&amp;gt; false), since, AFAIK, Rails is supposed to be about "convention no configuration."</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jesse</dc:creator><pubDate>Tue, 18 Mar 2008 15:42:44 -0000</pubDate></item><item><title>Re: 10 Tips for Optimizing MySQL Queries (That don&amp;#8217;t suck) | 20bits</title><link>http://20bits.com/articles/10-tips-for-optimizing-mysql-queries-that-dont-suck/#comment-3793235</link><description>OK, I guess I have to give you that.  We do pass :id=&amp;gt;false (which I think has been around basically forever) to the join table, but it's true that some Rails features flip out on :id=&amp;gt;false tables (even with 2.0.2).  I don't think I've seen any outflipping for join tables in particular, but I wouldn't bet against it.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ken</dc:creator><pubDate>Tue, 18 Mar 2008 15:19:09 -0000</pubDate></item><item><title>Re: 10 Tips for Optimizing MySQL Queries (That don&amp;#8217;t suck) | 20bits</title><link>http://20bits.com/articles/10-tips-for-optimizing-mysql-queries-that-dont-suck/#comment-3793234</link><description>ken,&lt;br&gt;&lt;br&gt;I think when I wrote this Rails would flip out if even the join table didn't have its own auto incrementing primary key.  This might have changed, but it's also possible I was wrong.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jesse</dc:creator><pubDate>Tue, 18 Mar 2008 13:51:28 -0000</pubDate></item><item><title>Re: 10 Tips for Optimizing MySQL Queries (That don&amp;#8217;t suck) | 20bits</title><link>http://20bits.com/articles/10-tips-for-optimizing-mysql-queries-that-dont-suck/#comment-3793233</link><description>Jesse:&lt;br&gt;&lt;br&gt;Rails doesn't support composite keys for model classes, but posts_tags here is just a join table, and it's fine with composite keys here -- in fact I'm pretty sure it's the default.  We do precisely this in several places, and I don't remember needing to do anything special.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ken</dc:creator><pubDate>Tue, 18 Mar 2008 13:44:53 -0000</pubDate></item></channel></rss>