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...]