mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-20 15:52:24 +02:00
Optimization to speed-up the "group-by" tables. (The complete solution is implemented in 2.0)
SVN:1.2.1[2337]
This commit is contained in:
@@ -348,7 +348,11 @@ class DisplayBlock
|
|||||||
$aGroupBy = array();
|
$aGroupBy = array();
|
||||||
$sLabels = array();
|
$sLabels = array();
|
||||||
$iTotalCount = $this->m_oSet->Count();
|
$iTotalCount = $this->m_oSet->Count();
|
||||||
while($oObj = $this->m_oSet->Fetch())
|
$oTmpSet = clone $this->m_oSet;
|
||||||
|
// Speed up the load, load only the needed field to group on
|
||||||
|
$sAlias = $oTmpSet->GetFilter()->GetClassAlias();
|
||||||
|
$oTmpSet->OptimizeColumnLoad(array($sAlias => array($sGroupByField)));
|
||||||
|
while($oObj = $oTmpSet->Fetch())
|
||||||
{
|
{
|
||||||
if (isset($aExtraParams['group_by_expr']))
|
if (isset($aExtraParams['group_by_expr']))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user