Coupon Code: santa14
Hurry up, offer expires soon!
Blog

SQLyog Query Profiler re-invented.

Baron Schwartz from Percona has  just re-invented the SQLyog Query Profiler.
Refer: http://www.mysqlperformanceblog.com/2012/02/20/how-to-convert-show-profiles-into-a-real-profile/

The SQLyog Query Profiler was introduced in SQLyog 8.o in February 2009 – exactly 3 years ago. The funny thing is actually that Baron Schwartz reviewed it before release (at friendly commercial terms) at the time. The SUM-aggregation and the ORDERING that we did (and it was solely our decision – not Baron’s advice) in SQLyog 8.0 to the result from SELECT FROM I_S.PROFILES is the same as Baron now announces as “something I developed”.

Well ..

1) First let me make it clear that I am not complaing.  I believe Baron when he tells that he does not remember details of the SQLyog Query Profiler today. When I use the term funny above I mean it. Baron is welcome to re-use it even if he forgot and had to re-invent it (and also we re-use his ‘Change Of STATUS VARIABLES Due To Execution Of Query’ profiling concept from the original Maatkit release as well).

2) But *developed* is a pretty strong term to use for a rather trivial query (just a SELECT .. SUM() ..  GROUP BY .. ORDER BY .. basically), I think.  Just like there are only 12 notes in (western) music and it is difficult to write music that does not resemble previous music somehow, it is also difficult to write queries that do not resemble previous queries (I know chess-players would disagree – with 64 squares and 32 pieces  possibilities seem infinite – but maybe the rules of chess allow for more creative combinations than the rules of SQL? I belive so.  It probably also applies to music – but not to SQL IMHO :-) ).

Happy PROFILING (with any tool you choose)! And Chess-playing as well!

3 thoughts on “SQLyog Query Profiler re-invented.

  1. “it is also difficult to write queries that do not resemble previous queries” — I fully disagree though I’m not a chess player.

    SQL pie chart?
    Selecting top-N records per group?
    Reading results of SHOW statements, on server side?
    Roland’s >Another ranking trick?
    Self throttling MySQL queries?
    Giuseppe’s implementing table quotas in MySQL?

    I’ve got *plenty* more to list. Point is, I believe there is *plenty* of room for writing queries which do not resemble other queries. Some are just eye candy, others solve real problems.

    Happy SQLing!

  2. Pingback: SQLyog Query Profiler re-invented. | MySQL | Syngu

  3. @Shlomi .. you are right of course. I am not in doubt that you can even write music or play chess (once you learn the rules) in SQL!

    I did not express me clearly.

    The culprit of the message is/was that if you want to use SHOW PROFILE and its SELECT FROM I_S counterpart (for anything else than debugging/optimizing server code, maybe), you will need to do something to the output – like filtering, sorting and aggregating. Without such the information is too overwhelming and chaotic to make sense for a human brain with even pretty simply queries. And as it is very simple SQL constructs that apply here (ORDER BY, GROUP BY an AGGREGATED column basically) the solutions will be almost identical.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>