summaryrefslogtreecommitdiff
path: root/database
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-05-14 09:23:47 +0000
committerDries Buytaert <dries@buytaert.net>2005-05-14 09:23:47 +0000
commit139ef4027ceae2691eb9c5cc2e1f21df44caa145 (patch)
tree54ab1f79c06cd9f2f9607319365ec69c2614d0b4 /database
parent229e2e4f234fc7b3380e8bf192e3dae48aaabc16 (diff)
downloadbrdo-139ef4027ceae2691eb9c5cc2e1f21df44caa145.tar.gz
brdo-139ef4027ceae2691eb9c5cc2e1f21df44caa145.tar.bz2
- Patch #22035 by mathias/mikeryan: improved performance of path aliases.
Diffstat (limited to 'database')
-rw-r--r--database/updates.inc15
1 files changed, 14 insertions, 1 deletions
diff --git a/database/updates.inc b/database/updates.inc
index 24f9a51dd..e5f1846cc 100644
--- a/database/updates.inc
+++ b/database/updates.inc
@@ -115,7 +115,8 @@ $sql_updates = array(
"2005-05-08" => "update_136",
"2005-05-09" => "update_137",
"2005-05-10" => "update_138",
- "2005-05-11" => "update_139"
+ "2005-05-11" => "update_139",
+ "2005-05-12" => "update_140"
);
function update_32() {
@@ -2489,6 +2490,18 @@ function update_139() {
return $ret;
}
+function update_140() {
+ $ret = array();
+
+ if ($GLOBALS['db_type'] == 'mysql') {
+ $ret[] = update_sql("ALTER TABLE {url_alias} ADD INDEX (src)");
+ }
+ elseif ($GLOBALS['db_type'] == 'pgsql') {
+ $ret[] = update_sql("CREATE INDEX url_alias_src ON {url_alias}(src)");
+ }
+ return $ret;
+}
+
function update_sql($sql) {
$edit = $_POST["edit"];
$result = db_query($sql);