quinta-feira, 25 de setembro de 2014

MySQL JET Profiller

I was recently faced with the challenge of solving a couple of SQL tuning on a MySQL Database, and since most of my tuning experience was on Microsoft Sql Server, I was a bit intimidated. The actual problem was fairly simple to solve: a couple of querys in the application login page were poorly constructed, so performance was bad.

But I took the oportunnity to search the web to find some kind of tool that I could relate to, the same tools I have on SQL SERVER, such as SQL Profiler. Searching google, one of the first options I found was MySQL Jet Profiler by Polaricon Software.   

Jet Profiler, as the name suggests, is a MySQL profiling tool that allows you to trace a especific MySQL Database and capture all the SQL requests that are fired against a especific MySQL instance. Its interface is very simple but the analysis and information are far from superficial. 

You can download the software at MySQL Jet Profiler, to your operational system (Windows, Mac and Linux).  A trial version of the software can be downloaded so you can evaluate it, Once you download it, install it on your computer. Mostly I'm a Windows user, and the install process in Windows was very smooth, with a Next>Next like process.

After installing, start the software by double clicking the icon at your start Menu and the initial screen should pop up soon. 

Fill in the credentials to your MySQL Database (it supports AWS Connections) and click ok, The main screen should be available. 



At the top Menu, you can use the File Menu to save and open especific Jet Profiler projects with your credentials for every database you need to trace. The EDIT menu lets you start/stop the tracing operation that can be also started/stoped by that big red button at the toolbar. Click that button and watch as the querys start popping in the TOP QUERIES grid tab. 



As the name suggests, TOP QUERIES list the heaviest querys, and SLOW QUERIES tab lists the queries that take a long time to execute (you can filter that, using the EDIT RECORD SETTINGS and set the SLOW QUERY THRESHOLD).


At the top query grid, there is the EXPLAIN column, that actually "explains" whats wrong with your query. Click that and see for yourself:



At the TOP, there are the PRESET buttons that change the view to other topics that affect performance such as table sizes, locks, innodb cache, etc.


The other tabs, offer a visual profile on what is affecting the performance. TOP TABLES is like this:


Although JET profiler is simple, It helped me pinpoint the problematic querys in my server, in a visual and accessible manner. Last, but not least, there is a reporting tool, where you can list all the data captured in the profiling session. You can use it in File > SAVE HTML REPORT, and add a name to your HTML report.


All of this is available for $ 499 in the professional version and $ 799 in the Enterprise version. In the Enterprise you can trace many servers at onc, and in the profesional is one at a time.

I tryed and recommend the professional version because it was surely a help when tuning MySQL Server.


Check out my new book on MariaDB http://www.amazon.com/dp/B00MQC06HC

Nenhum comentário:

Postar um comentário

Leave your comment here!