issue 1980 Add use index to document select query

add low priority to document DML query


git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10665 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ovclas 2012-05-07 04:59:43 +00:00
parent 3bbddf032e
commit 4d4b66d0d2
6 changed files with 10 additions and 9 deletions

View file

@ -252,7 +252,7 @@
$division = (int)Context::get('division');
// order by list_order and (module_srl===0 or module_srl many count), therefore case table full scan
if($args->sort_index == 'list_order' && ((int)$args->exclude_module_srl === 0 || count($args->module_srl) > 10))
if($args->sort_index == 'list_order' && ($args->exclude_module_srl === '0' || count(explode(',', $args->module_srl)) > 5))
{
$listSqlID = 'document.getDocumentListUseIndex';
$divisionSqlID = 'document.getDocumentDivisionUseIndex';