<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>It is about performance on FromDual GmbH</title><link>https://www.fromdual.com/blog/impact-of-indices/comment-97/</link><description>Recent content in It is about performance on FromDual GmbH</description><generator>Hugo</generator><language>en-GB</language><managingEditor>oli.sennhauser@fromdual.com (Oli Sennhauser)</managingEditor><webMaster>oli.sennhauser@fromdual.com (Oli Sennhauser)</webMaster><copyright>© FromDual GmbH</copyright><lastBuildDate>Fri, 07 Jan 2011 23:44:29 +0200</lastBuildDate><atom:link href="https://www.fromdual.com/blog/impact-of-indices/comment-97/index.xml" rel="self" type="application/rss+xml"/><item><title>Thanks, I appreciate the</title><link>https://www.fromdual.com/blog/impact-of-indices/comment-101/</link><pubDate>Fri, 07 Jan 2011 23:44:29 +0200</pubDate><author>oli.sennhauser@fromdual.com (Oli Sennhauser)</author><guid>https://www.fromdual.com/blog/impact-of-indices/comment-101/</guid><description>&lt;p&gt;Thanks, I appreciate the effort you are taking to find the truth.
-Bradley&lt;/p&gt;</description></item><item><title>I didn't mean to be flaming,</title><link>https://www.fromdual.com/blog/impact-of-indices/comment-99/</link><pubDate>Fri, 07 Jan 2011 15:11:49 +0200</pubDate><author>oli.sennhauser@fromdual.com (Oli Sennhauser)</author><guid>https://www.fromdual.com/blog/impact-of-indices/comment-99/</guid><description>&lt;p&gt;I didn&amp;rsquo;t mean to be flaming, I&amp;rsquo;m sorry if it seemed that way. And I apologize for not noticing that the response to my comment wasn&amp;rsquo;t from the original author.&lt;/p&gt;
&lt;p&gt;I guess I got a different message from the original posting. The original posting observed that indexes cost something. But what&amp;rsquo;s the point of that observation? The point is to do something to your database to fix the slowness. The original posting implied that dropping some indexes would be one fix to the problem. The chart says fewer indexes means higher performance. So far, so good.&lt;/p&gt;
&lt;p&gt;However, there are other things you could do. For example, switch to InnoDB or TokuDB. (There may be other approaches such as using some NoSQL solution, but let&amp;rsquo;s put those aside for now.)&lt;/p&gt;
&lt;p&gt;I guess I misread the original posting. Upon re-reading, it seems like the data in the original posting doesn&amp;rsquo;t look so bad. After all, inserting 500K rows in 3 minutes instead of 90 seconds to get 5 indexes doesn&amp;rsquo;t seem so bad. Sure, indexes cost &lt;em&gt;something&lt;/em&gt;, but it&amp;rsquo;s not much on this measurement. (In fact, for such a small database, perhaps MyISAM is faster than InnoDB. But the problems I&amp;rsquo;ve seen don&amp;rsquo;t become difficult until the databases get larger.)&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s a much more interesting experiment (at least more interesting to me): What happens if
a) the tables are bigger than main memory, and
b) the indexes are random (or nearly random) values (things like UUID-PKs).
Check out Mark Callaghan&amp;rsquo;s postings on his MySQL at Facebook page to see the advantage that InnoDB offers. (And check out the graphs on Tokutek.com to see the additional advantages that TokuDB offers. Or don&amp;rsquo;t if you really don&amp;rsquo;t want to know about a non-GPL solution.)&lt;/p&gt;
&lt;p&gt;I guess my point is that if you are finding that the cost of maintaining indexes is slowing down your DML, dropping the indexes isn&amp;rsquo;t your only option. You may like the indexes because they speed up queries. Given a fixed hardware budget and a fixed …&lt;/p&gt;</description></item><item><title>It is about performance</title><link>https://www.fromdual.com/blog/impact-of-indices/comment-97/</link><pubDate>Fri, 07 Jan 2011 13:13:53 +0200</pubDate><author>oli.sennhauser@fromdual.com (Oli Sennhauser)</author><guid>https://www.fromdual.com/blog/impact-of-indices/comment-97/</guid><description>&lt;p&gt;You are correct that indexes cost something in InnoDB. However, if you measure InnoDB you will likely find it is much faster than MyISAM for insertions when maintaining an index on a large table. My measurements (and others, such as Mark Callaghan at Facebook) say that InnoDB is faster (maybe 4x) for this kind of load.&lt;/p&gt;
&lt;p&gt;Also you are correct that some people will not consider using a non-GPL storage engine, and that&amp;rsquo;s fine. That&amp;rsquo;s part of why I am pointing out that InnoDB is far better suited than MyISAM for the load you measured.&lt;/p&gt;
&lt;p&gt;Some people are willing to use a non-GPL storage engine if it offers some other advantage, however. In the case of TokuDB, one advantage is more than a 10x performance improvement for this kind of load. (There are other advantages such as compression.)&lt;/p&gt;
&lt;p&gt;I read your home page, which says you offer &amp;ldquo;vendor neutral&amp;rdquo; consulting, and that you are in the business of recommending the best solution to meet your clients needs. I hope that there are &lt;em&gt;some&lt;/em&gt; situations where TokuDB would be the best solution to meet your clients needs, and if you find such a client, I hope we can work together.&lt;/p&gt;
&lt;p&gt;-Bradley&lt;/p&gt;</description></item><item><title>Use a better indexer</title><link>https://www.fromdual.com/blog/impact-of-indices/comment-95/</link><pubDate>Thu, 06 Jan 2011 02:30:22 +0200</pubDate><author>oli.sennhauser@fromdual.com (Oli Sennhauser)</author><guid>https://www.fromdual.com/blog/impact-of-indices/comment-95/</guid><description>&lt;p&gt;Using MyISAM is just asking for poor performance. Try using a storage engine that is actually good at indexing.&lt;/p&gt;
&lt;p&gt;For example, InnoDB offers a substantial improvement (perhaps a factor of 4) over MyISAM for maintaining indexes. InnoDB uses an change buffer to achieve that performance.&lt;/p&gt;
&lt;p&gt;For really high DML operations, try TokuDB (tokutek.com), which is about ten times faster than InnoDB. TokuDB uses fractal tree indexes to achieve its performance.&lt;/p&gt;
&lt;p&gt;Both InnoDB and TokuDB are transactional and can recover from crashes. MyISAM will corrupt your data on a crash.&lt;/p&gt;</description></item></channel></rss>