From 139ef4027ceae2691eb9c5cc2e1f21df44caa145 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 14 May 2005 09:23:47 +0000 Subject: - Patch #22035 by mathias/mikeryan: improved performance of path aliases. --- database/updates.inc | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'database') 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); -- cgit v1.2.3