summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGábor Hojtsy <gabor@hojtsy.hu>2007-11-04 16:39:59 +0000
committerGábor Hojtsy <gabor@hojtsy.hu>2007-11-04 16:39:59 +0000
commitac914745c6895b10ac970c4cff4a8b8a8bcaeca5 (patch)
treee5fcd27c7da644f3b6ec87d94a0b836042940d94
parent5cc13f72711793af2f76ed1663329ba5ccb85205 (diff)
downloadbrdo-ac914745c6895b10ac970c4cff4a8b8a8bcaeca5.tar.gz
brdo-ac914745c6895b10ac970c4cff4a8b8a8bcaeca5.tar.bz2
#185126 by moshe weitzman, David Strauss, bjaspan and JirkaRybka: improve index on system table for better database performance
-rw-r--r--modules/system/system.install17
1 files changed, 16 insertions, 1 deletions
diff --git a/modules/system/system.install b/modules/system/system.install
index 60d5046d7..028a0bdb6 100644
--- a/modules/system/system.install
+++ b/modules/system/system.install
@@ -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(
@@ -4444,6 +4448,17 @@ function system_update_6034() {
}
/**
+ * 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.
*/