This project is not covered by Drupal’s security advisory policy.

Parse pt-query-digest json output from MySQL slow query logs, identify potential indexes and add them when particular column names or column name combinations are found.

This is designed primarily for tables with simple single table queries with simple FROM, WHERE and ORDER BY clauses. It is helpful primarily if you have many large tables with dynamic schemas that can change over time as well as needing to support fairly arbitrary queries.

If you have either tables that have static schemas, queries that are known in advance or are complex (JOINs, sub-queries, calculated fields etc) you are better off crafting your indexes by hand.

This is a working proof of concept, but is shared in case it is of value for others.

Supporting organizations: 
Initial development

Project information

Releases