Skip to content

tyler36/ddev-dbslow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tests project is maintained

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

  1. Install the addon.

    ddev get tyler36/dbslow
  2. Restart DDEV.

    ddev restart

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

  • Add configuration options for settings.
  • Add tests for ddev dbslow tail
  • Add tests for MySQL
  • Add support for Postgres

Contributed and maintained by @tyler36