March 30, 2010

Can we get faster expression handling in MySQL

Posted by peter |

Andrew from Sphinx continues to work on improving SQL (or SphinxQL) support and now he published benchmarks comparing arithmetic expression handling in Sphinx to one in MySQL. The result ? Sphinx scored 3x to 20x faster. Andrew goes to explain results are not 100% comparable (as we can see in the table results are even different) and some performance can be attributed to Sphinx using different typing for expression. Though I’m wondering how much of Performance difference that really explain. I doubt it is 20x. Andrew goes on to explain there are further optimizations possible for Sphinx such as JIT compilation and expression optimization which he claims can increase the lead even further

Andrew is kind enough to provide explanations and benchmark results though this is far from the first notion of this problem I hear about. Many other companies looking to optimize MySQL problem, especially in analytics space when expressions should be computed over hundreds of millions of rows have expressed their concerns with this part of MySQL execution. I’m wondering if we’re going to see any improvements in this space by Oracle, MariaDB or Drizzle. I think Drizzle is in advantage here – with simplifying MySQL functionality a lot they probably can also simplify expression handling to be faster.

Related posts: :Optimizing repeated subexpressions in MySQL::Guess what?! Microsecond slow query timing finally available in MySQL!::Mail clients and Databases:
 

6 Comments »

  1. 1. Mark Callaghan

    Will Andrew describe this in his talk at the User Conference?
    http://en.oreilly.com/mysql2010/public/schedule/detail/13341

    Comment :: March 30, 2010 @ 5:44 pm

  2. Mark,

    I do not know but I surely can tell him to mention it :)

    Comment :: March 30, 2010 @ 6:09 pm

  3. 3. neh

    yep sphinx is indeed that faster.. i used it on wikipedia dumps and i was lyk shocked to see the performance difference. It will be awesome to see such improvements in drizzle!

    Comment :: March 30, 2010 @ 7:16 pm

  4. Mark, technically this (ie. support for expressions) isn’t a new feature, just a new benchmark, so frankly I was not going to. Though on the other hand if I quickly hack in double precision support that’d be formally new + we perhaps do want to highlight it anyway… :)

    Comment :: March 31, 2010 @ 1:19 am

  5. Surely, it is faster but the results are wrong in many tests. Does it prove that expression handling in Sphinx is faster than in MySQL?

    Comment :: April 5, 2010 @ 11:25 am

  6. Vlad,

    As the article says typing is different in Sphinx and MySQL which why results are different. I would not call these wrong results. Also you can see significant difference een when result is the same.

    Comment :: April 5, 2010 @ 12:15 pm

 

Subscribe without commenting

Trackbacks/Pingbacks