From a9c4060dd6cc9ae8f103e0206b405b1990cf2c60 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 19 Jul 2015 09:12:47 +0000 Subject: [PATCH] shorten index on egw_sqlfs.fs_name to improve performance --- phpgwapi/setup/tables_current.inc.php | 2 +- phpgwapi/setup/tables_update.inc.php | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/phpgwapi/setup/tables_current.inc.php b/phpgwapi/setup/tables_current.inc.php index 6279c36fcd..c268b05ae7 100644 --- a/phpgwapi/setup/tables_current.inc.php +++ b/phpgwapi/setup/tables_current.inc.php @@ -366,7 +366,7 @@ $phpgw_baseline = array( ), 'pk' => array('fs_id'), 'fk' => array(), - 'ix' => array(array('fs_dir','fs_active','fs_name')), + 'ix' => array(array('fs_dir','fs_active','fs_name(16)')), 'uc' => array() ), 'egw_index_keywords' => array( diff --git a/phpgwapi/setup/tables_update.inc.php b/phpgwapi/setup/tables_update.inc.php index 6d7adba2f1..5d1c3134de 100644 --- a/phpgwapi/setup/tables_update.inc.php +++ b/phpgwapi/setup/tables_update.inc.php @@ -722,7 +722,7 @@ function phpgwapi_upgrade14_2_024() )); return $GLOBALS['setup_info']['phpgwapi']['currentver'] = - empty($GLOBALS['run-from-upgrade14_2_001']) ? '14.3' : '14.2.025'; + empty($GLOBALS['run-from-upgrade14_2_001']) ? '14.2.026' : '14.2.025'; } @@ -752,5 +752,18 @@ function phpgwapi_upgrade14_2_025() 'default' => '' )); + return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '14.2.026'; +} + +/** + * Shorten index on egw_sqlfs.fs_name to improve performance + * + * @return string + */ +function phpgwapi_upgrade14_2_026() +{ + $GLOBALS['egw_setup']->oProc->DropIndex('egw_sqlfs', array('fs_dir','fs_active','fs_name')); + $GLOBALS['egw_setup']->oProc->CreateIndex('egw_sqlfs', array('fs_dir','fs_active','fs_name(16)')); + return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '14.3'; }