Calendar

««Nov 2009»»
SMTWTFS
1234567
89
10
11121314
15
16
17
18192021
22232425262728
2930

Alert Email

Get a short email alert whenever a new entry is published.

Confidential, secure it's piece of cake to keep uptodate.

Debug queries using OpenBD's slow log feature

Published: 9:09 AM GMT, Wednesday, 9 September 2009

Have you ever wondered what queries your CFML application is making? Or how long each query is taking? Or even better, how would you like to log queries that take a given amount of time to execute?

The popular MySQL database has always had the very handy 'slow log' feature, where by it can log long running queries that execute over a given timeout threshold. Extremely useful for debugging and spotting long running queries.

However, not all databases have this feature, and more importantly, they don't give you a full view from the point of view of your CFML application. With that in mind, OpenBD introduces the Slow Log feature to your CFML querying functionility.

Any query run via CFQUERY, CFSTOREDPROC, or as a background thread, can be traced using the new "slow log" functionality. You can determine the length the query took, the SQL statement or stored-procedure name, and the precise location within your application the query originated from.

This is logged into a rotating log file, allowing you to log every query made, or only ones that exceed a timeout value. This can be used irrespective of the backend database, and takes into account all network delays associated with making the query.

For full details see: OpenBD Slow Log Wiki

This is now available in our nightly build and will be in our upcoming official release very soon.

Comments (1)

Love the feature would have liked to have seen the ability to specify the timeout value in ms rather than seconds, some times when performance tuning an app id like to find queries taking 100ms or more ?

left by Alex . Wednesday, 9 September 2009 7:56 PM
Add Comment