some index to speed up access/update of huge access-logs

This commit is contained in:
Ralf Becker 2012-06-12 06:29:02 +00:00
parent d9d842ceb6
commit 5549c2d3b9
3 changed files with 15 additions and 4 deletions

View File

@ -12,7 +12,7 @@
/* Basic information about this app */ /* Basic information about this app */
$setup_info['phpgwapi']['name'] = 'phpgwapi'; $setup_info['phpgwapi']['name'] = 'phpgwapi';
$setup_info['phpgwapi']['title'] = 'EGroupware API'; $setup_info['phpgwapi']['title'] = 'EGroupware API';
$setup_info['phpgwapi']['version'] = '1.9.016'; $setup_info['phpgwapi']['version'] = '1.9.017';
$setup_info['phpgwapi']['versions']['current_header'] = '1.29'; $setup_info['phpgwapi']['versions']['current_header'] = '1.29';
$setup_info['phpgwapi']['enable'] = 3; $setup_info['phpgwapi']['enable'] = 3;
$setup_info['phpgwapi']['app_order'] = 1; $setup_info['phpgwapi']['app_order'] = 1;
@ -74,5 +74,3 @@ $setup_info['groupdav']['author'] = $setup_info['groupdav']['maintainer'] = arra
$setup_info['groupdav']['license'] = 'GPL'; $setup_info['groupdav']['license'] = 'GPL';
$setup_info['groupdav']['hooks']['preferences'] = 'groupdav_hooks::menus'; $setup_info['groupdav']['hooks']['preferences'] = 'groupdav_hooks::menus';
$setup_info['groupdav']['hooks']['settings'] = 'groupdav_hooks::settings'; $setup_info['groupdav']['hooks']['settings'] = 'groupdav_hooks::settings';

View File

@ -97,7 +97,7 @@ $phpgw_baseline = array(
), ),
'pk' => array('sessionid'), 'pk' => array('sessionid'),
'fk' => array(), 'fk' => array(),
'ix' => array('li','lo','session_dla','notification_heartbeat'), 'ix' => array('li','lo','session_dla','session_php','notification_heartbeat',array('account_id','ip','li'),array('account_id','loginid','li')),
'uc' => array() 'uc' => array()
), ),
'egw_hooks' => array( 'egw_hooks' => array(

View File

@ -427,3 +427,16 @@ function phpgwapi_upgrade1_9_015()
return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.9.016'; return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.9.016';
} }
/**
* Some index to speed up access/update of huge access-logs
*/
function phpgwapi_upgrade1_9_016()
{
$GLOBALS['egw_setup']->oProc->CreateIndex('egw_access_log','session_php');
$GLOBALS['egw_setup']->oProc->CreateIndex('egw_access_log',array('acount_id','ip','li'));
$GLOBALS['egw_setup']->oProc->CreateIndex('egw_access_log',array('acount_id','loginid','li'));
return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.9.017';
}