Is it possible to output the Devel generated query log in some way? By default, it prints to the bottom of the page which is fine until I need to send the results to someone else to review.

2 Answers 2


The devel module has an option to log the query times into the database, and you can then run your own analysis on this and do whatever you like with it.

This is something to be careful about as it is a lot of data and can add up quickly. However, for more sophisticated/aggregate analysis, it's quite useful.

After enabling query logging, you can see some results at http://yoursite.com/devel/queries

  • I attempted this, but for some reason the number of queries logged to the database table for one page request was always signifigantly less then what was reported on the page (by a factor of 10 on the page I was looking at). Commented Mar 25, 2011 at 2:11
  • The mysql query log may also be an option, see dev.mysql.com/doc/refman/5.1/en/query-log.html
    – beeradb
    Commented Mar 25, 2011 at 4:06

The solution I came up with was to view the source on the page and to copy the query log <div> out and paste it into an html file. I then used Firebug to take out to copy the relevant css and add it to the html file as well. What ended up with was one, reasonably formatted, .html file that I could send to whoever needed to look at the query log. Not a particularly elegant solution but it served my purposes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.