Last updated by Owen Barton on Tue, 2008-11-04 16:29
This is a wiki to plan a module to allow admins to add indexes to their site schema - this can be done easily in Drupal 6 and beyond using http://api.drupal.org/api/function/hook_schema_alter/6 - this discussion came from http://drupal.org/node/231453, where it was realized that CCK does not really have the usage context to be able to do this effectively, and also there are tables beyond CCK getting used in new ways by views and other modules that also need alternate indexes.
Ideally, this module would be able to analyze usage (probably using devel query/performance log) and determine likely indexes that would help. Obviously that would be a complex piece of work (and impossible to get perfect), so a better starting point would probably be to simply list the slowest queries and give a nicely formatted EXPLAIN, with an interface to add (and retest) admin selected indexes.
Please add user interface and implementation ideas below: