new index on links-table to speed up ProjectManager sub-project queries

This commit is contained in:
Ralf Becker 2019-10-25 09:49:03 +02:00
parent 0892675b8e
commit 6f58e88ecc
3 changed files with 14 additions and 3 deletions

View File

@ -11,7 +11,7 @@
/* Basic information about this app */
$setup_info['api']['name'] = 'api';
$setup_info['api']['title'] = 'EGroupware API';
$setup_info['api']['version'] = '19.1.002';
$setup_info['api']['version'] = '19.1.003';
$setup_info['api']['versions']['current_header'] = '1.29';
// maintenance release in sync with changelog in doc/rpm-build/debian.changes
$setup_info['api']['versions']['maintenance_release'] = '19.1.20190925';
@ -130,4 +130,3 @@ $setup_info['groupdav']['author'] = $setup_info['groupdav']['maintainer'] = arra
$setup_info['groupdav']['license'] = 'GPL';
$setup_info['groupdav']['hooks']['preferences'] = 'EGroupware\\Api\\CalDAV\\Hooks::menus';
$setup_info['groupdav']['hooks']['settings'] = 'EGroupware\\Api\\CalDAV\\Hooks::settings';

View File

@ -191,7 +191,7 @@ $phpgw_baseline = array(
),
'pk' => array('link_id'),
'fk' => array(),
'ix' => array('deleted',array('link_app1','link_id1','link_lastmod'),array('link_app2','link_id2','link_lastmod')),
'ix' => array('deleted',array('link_app1','link_id1','link_lastmod'),array('link_app2','link_id2','link_lastmod'),array('link_app1','link_app2','link_id1','link_id2')),
'uc' => array()
),
'egw_addressbook' => array(

View File

@ -692,3 +692,15 @@ function api_upgrade19_1_001()
}
return $GLOBALS['setup_info']['api']['currentver'] = '19.1.002';
}
/**
* Index to speed up ProjectManager link-/sub-project-queries
*
* @return string
*/
function api_upgrade19_1_002()
{
$GLOBALS['egw_setup']->oProc->CreateIndex('egw_links', array('link_app1','link_app2','link_id1','link_id2'));
return $GLOBALS['setup_info']['api']['currentver'] = '19.1.003';
}