Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

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.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
6
Tracked since
Feb 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 6
Maintenance
Dormant

Release Timeline

Releases

Version Type Core Release date
1.0.0-beta5 Pre-release 10–11 Mar 3, 2025
1.0.0-beta4 Pre-release 9–11 Feb 12, 2025
1.0.0-beta3 Pre-release 9–11 Feb 12, 2025
1.0.0-beta2 Pre-release 9–11 Feb 11, 2025
1.0.0-beta1 Pre-release 9–11 Feb 11, 2025
1.0.x-dev Dev 10–11 Feb 11, 2025