System News
Optimizing the DTrace logger for MySQL queries
See SQL Queries As They Run
November 17, 2008,
Volume 129, Issue 3

DTrace logging should be better than the typical database logging, at least on a system with enough free cycles.
 

The Data Charmer Giuseppe Maxia did some quick tests on the DTrace scripts and was wondering if Angelo, of the SoapBox could help to optimize it a little. One issue with the old script, which Angelo tackled, is that it prints every SQL statement. This can be pretty expensive. Users can minimize this problem by printing to a file. Here is a script that will do just that. Users can usually expect a 30 percent improvement in logging performance with this improved script.

One more optimization that can used with DTrace is the use of aggregates. Aggregates provides summary information. So this script will not provide a running log, but if performance of the logger is important to the task, or can function with the summary then this is the script for that purpose.

DTrace does the printing/aggregating asynchronously, so the performance of DTrace logging should be better than the typical database logging, at least on a system with enough free cycles.

More Information

Angelo\'s Soapbox

DTrace

Web 2.0

Sun Weblogs [...read more...]

Keywords:

fullsource
 

Other articles in the MySQL section of Volume 129, Issue 3:

See all archived articles in the MySQL section.



News and Solutions for Users of Solaris, Java and Oracle's Sun hardware products
Just the news you need, none of what you don't – 42,000+ Members – 24,000+ Articles Published since 1998