Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

DB Queries

3 sites No security coverage
View on drupal.org

This module logs the number of database queries performed for each page on your site, allowing you to identify pages with unusually high query counts that may indicate performance issues. It can be enabled and disabled from the module's settings and provides a view for examining the collected data.

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.

Activity

Total releases
5
First release
Feb 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 5
Maintenance
Dormant

Release Timeline

Releases

Version Type Release date
1.0.0-beta4 Pre-release Feb 12, 2025
1.0.0-beta3 Pre-release Feb 12, 2025
1.0.0-beta2 Pre-release Feb 11, 2025
1.0.0-beta1 Pre-release Feb 11, 2025
1.0.x-dev Dev Feb 11, 2025