
This project is not covered by Drupal’s security advisory policy.
A module for profiling database query counts.
The number of database queries performed on each URI/path is logged to a database table where the count of requests performed for each request path, along with the minimum, maximum, last and request time values are recorded.
The module serves a different use case to the Webprofiler module which is ideally suited to a development environment and is invaluable in debugging and establishing performance issues but is primarily of use when you, the developer are the one loading/viewing pages.
This module allows you to run it in a production environment, for a limited period, and collect information about the number of queries that are being performed by different pages of your site when those page requests are being initiated by real world users.
With this information you can then narrow your focus to pages that look suspicious because they have high query counts. Maybe coding errors or caching not working as expected etc..
Features
* Logs request query count data to a database table.
* A view is provided for examining profiling count data.
* Logging can be initiated or stopped from the modules settings (no need to enable/disable).
* Paths/URIs that counts are collected for can be filtered by path regex and minimum count value.
* Logging of query counts can be enabled or disabled from the module settings.
* Database query count data can be truncated from the settings dialog.
* The Site Guardian API is supported so data from the query counts can be examined remotely.
Considerations
* This module adds a DB upsert to every request that Drupal handles so does add some overhead. A single page load can be many requests so you should consider the impact it may have on any site you use it on. With a Drupal page request often performing 100's of queries per request the overhead is likely to be significant or negatively impact the site.
* General advice would be to run this on a non production environment when possible or if needs must run it in production for the minimal amount of time neccessary to get the information you need. This is easy to do by installing the module, enabling profiling in the settings for a short period and then disabling profiling. You can then use the report view to examine the data.
Post-Installation
Visit admin->config->development->DB Queries to enable or disable counting of queries.
Visit admin->reports->DB Queries to view the DB query counts for the sites requests.
Project information
- Project categories: Administration tools, Developer tools, Performance
- Ecosystem: Site Guardian
3 sites report using this module
- Created by arcaic on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
Releases
Development version: 1.0.x-dev updated 3 Mar 2025 at 13:50 UTC