diff options
author | Dries Buytaert <dries@buytaert.net> | 2006-08-27 09:33:31 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2006-08-27 09:33:31 +0000 |
commit | 163f1accd9e80664f8f62c7d86487417df39caf4 (patch) | |
tree | c92edc5911d2835ed22d8255d603d9fab7c47b20 /modules/system | |
parent | d5aae21fa2aa0e55f270c284406014e14df07087 (diff) | |
download | brdo-163f1accd9e80664f8f62c7d86487417df39caf4.tar.gz brdo-163f1accd9e80664f8f62c7d86487417df39caf4.tar.bz2 |
- Patch #42463: performance improvement: add index on the source field of the locale table.
Diffstat (limited to 'modules/system')
-rw-r--r-- | modules/system/system.install | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/modules/system/system.install b/modules/system/system.install index b7fd920dd..ac8aebaa0 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -3091,6 +3091,23 @@ function system_update_1007() { } /** + * Performance update for queries that are related to the locale.module + */ +function system_update_1008() { + $ret = array(); + switch ($GLOBALS['db_type']) { + case 'mysql': + case 'mysqli': + $ret[] = update_sql('ALTER TABLE {locales_source} ADD KEY source (source(30))'); + break; + case 'pgsql': + $ret[] = update_sql("CREATE INDEX {locales_source}_source_idx on {locales_source} (source)"); + } + + return $ret; +} + +/** * @} End of "defgroup updates-4.7-to-x.x" * The next series of updates should start at 2000. */ |