OpenBD Wiki

From OpenBD
Jump to: navigation, search

Slow log

Sometimes it is desirable to know how your queries are operating, both in frequency and execution times.

Many databases support this logging at their side. For example MySQL operates the Slow Query Log

OpenBD introduced the slow log feature, that lets you track all queries originating from CFQUERY, CFSTOREDPROC and any background queries you make. The big advantage of using it at this layer, is that all network delays are counted, as well as all databases.

By adding in the "slowlog" flag into the bluedragon.xml you can enable slow logging, expressed in seconds.

<server>
  <cfquery>
    <slowlog>5</slowlog>
  </cfquery>
</server>

A value of 0, will log all queries. A value of -1, or removal of the entry will disable the logging of all queries.

A rotational log file will be created in the working directory of "slowlog/slow.log" that will list all the queries that satisfy the time out criteria.


Personal tools