#185126 by moshe weitzman, David Strauss, bjaspan and JirkaRybka: improve index on system table for better database performance
parent
5cc13f7271
commit
ac914745c6
|
@ -935,7 +935,11 @@ function system_schema() {
|
|||
'not null' => FALSE)
|
||||
),
|
||||
'primary key' => array('filename'),
|
||||
'indexes' => array('weight' => array('weight')),
|
||||
'indexes' =>
|
||||
array(
|
||||
'modules' => array(array('type', 12), 'status', 'weight', 'filename'),
|
||||
'bootstrap' => array(array('type', 12), 'status', 'bootstrap', 'weight', 'filename'),
|
||||
),
|
||||
);
|
||||
|
||||
$schema['url_alias'] = array(
|
||||
|
@ -4443,6 +4447,17 @@ function system_update_6034() {
|
|||
return $ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Change index on system table for better performance.
|
||||
*/
|
||||
function system_update_6035() {
|
||||
$ret = array();
|
||||
db_drop_index($ret, 'system', 'weight');
|
||||
db_add_index($ret, 'system', 'modules', array(array('type', 12), 'status', 'weight', 'filename'));
|
||||
db_add_index($ret, 'system', 'bootstrap', array(array('type', 12), 'status', 'bootstrap', 'weight', 'filename'));
|
||||
return $ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @} End of "defgroup updates-5.x-to-6.x"
|
||||
* The next series of updates should start at 7000.
|
||||
|
|
Loading…
Reference in New Issue