Skip to content

Commit

Permalink
Merge pull request #94 from matomo-org/PG-3720-allow-force-index
Browse files Browse the repository at this point in the history
Updated the conversion query to force index
  • Loading branch information
snake14 authored Oct 23, 2024
2 parents 62355ce + 9f665db commit cf0a48d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion RecordBuilders/CustomVariables.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
use Piwik\Plugins\CustomVariables\Archiver;
use Piwik\Plugins\CustomVariables\Model;
use Piwik\Tracker\GoalManager;
use Piwik\Version;

class CustomVariables extends RecordBuilder
{
Expand Down Expand Up @@ -95,7 +96,9 @@ protected function aggregateCustomVariable(DataTable $record, array &$metadata,
$query = $logAggregator->queryActionsByDimension($dimensions, $where, $additionalSelects);
$this->aggregateFromActions($record, $metadata, $metadataFlat, $query, $keyField, $valueField);

$query = $logAggregator->queryConversionsByDimension($dimensions, $where);
$query = version_compare(Version::VERSION, '5.2.0-b6', '>=')
? $logAggregator->queryConversionsByDimension($dimensions, $where, [], [], false, false, true)
: $logAggregator->queryConversionsByDimension($dimensions, $where);
$this->aggregateFromConversions($record, $query, $keyField, $valueField);
}

Expand Down

0 comments on commit cf0a48d

Please sign in to comment.