Optimization to speed-up the "group-by" tables. (The complete solution is implemented in 2.0)

SVN:1.2[2338]
This commit is contained in:
Denis Flaven
2012-10-24 13:13:15 +00:00
parent 2bb8028d4d
commit 02e0a61dcf

View File

@@ -348,7 +348,11 @@ class DisplayBlock
$aGroupBy = array();
$sLabels = array();
$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']))
{