
dbslow
What is dbslow?
This addon is designed to log slow queries (>1 second). Slow queries degrade site performance.
By tracking slow queries, developer gain insight to how the database is being used and specific areas to focus for improvement.
This addon was inspired by ChromaticHQ/ddev-dblog. The main difference is
ddev-dblog
logs all queries.
ddev-dbslow
logs queries slow queries (>1 second)
As both addons mature, it is possible this functionality will merge into ddev-dblog
or DDEV core.
Getting started
-
Install the addon.
For DDEV v1.23.5 or above run
ddev add-on get tyler36/ddev-dbslow
For earlier versions of DDEV run
ddev get tyler36/ddev-dbslow
-
Restart DDEV.
Usage
Starting and stopping
ddev dbslow on
: Start logging slow queries.
ddev dbslow off
: Stop logging slow queries.
ddev dbslow toggle
: Toggle the current state of the logging. Ie. OFF => ON, ON => OFF.
Viewing
ddev dbslow view
: Display the log file.
ddev dbslow tail
: Stream the log file in the terminal.
TODO
Contributed and maintained by @tyler36