Conclusion and summary of the guidelines
Last updated on
8 September 2016
Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites
- Use a collection of SQL performance tools, including Drupal Devel module, database server-side logging and an SQL client. You will need these three tools, install them and learn to use them.
- Log slow SQL queries server-side in the database. SQL query should always execute in less than 30 ms in the database. If not, they should be logged.
- Use Drupal Devel module for a first analysis of these queries.
- Run EXPLAIN on slow queries in the SQL client to find sequential scans.
- Sequential scans are your enemies, especially if you plan to run your code on large servers. Try to understand when CPU time is lost. Follow simple rules to write queries which do not imply any sequential scan or very rarely. This will drive down CPU time and improve the quality of your code.
Help improve this page
Page status: No known problems
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion
Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.