The db module should support a slow query threshold time, and log the full SQL statement of any statement that takes longer than this time. A suggested default slow-query threshold is 10 seconds.
db