0

I want to log / capture all the queries executed by the drupal?
update, select, insert any query, is there any hook or what will be the method to do this.

2

You want Devel.

It has a lot of helpful tools for Drupal developers, including a helper function to print a summary of all database queries for each page request at the bottom of each page. The summary includes how many times each query was executed on a page (shouldn't run same query multiple times), and how long each query took.

| improve this answer | |
  • tried Devel, it is giving the front end queries in debug mod, only select and update to cache table – Abuzer Firdousi Jan 7 '13 at 14:40
0

Note that Drupal can generate a lot of queries for a single page view. So if you don't want to be doing anything programmatic with the queries then maybe a better option is to just log everything with the MySQL query log.

| improve this answer | |
  • mainly want to keep track on insert and update queries – Abuzer Firdousi Jan 7 '13 at 12:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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