diff options
author | mattab <matthieu.aubry@gmail.com> | 2015-06-18 03:00:55 +0300 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2015-06-18 03:00:55 +0300 |
commit | 937e73dff91b3b8d97380c3648ba29d3e850a10c (patch) | |
tree | 00bab3ad8ff24b98e5341039c7757b1c943b893f /core/Plugin/Segment.php | |
parent | abefedee76c37450b011a5a29cb9beec1aceff94 (diff) |
when we know a segment won't match any row, replace the SQL sub-expression by (1 = 0)
Segment SQL generator: un-needed joins on log_link_visit_action are removed, making the query a bit faster
Diffstat (limited to 'core/Plugin/Segment.php')
-rw-r--r-- | core/Plugin/Segment.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/Plugin/Segment.php b/core/Plugin/Segment.php index 8553703b08..b9164898a8 100644 --- a/core/Plugin/Segment.php +++ b/core/Plugin/Segment.php @@ -124,6 +124,8 @@ class Segment * or callable: `string $valueToMatch`, `string $segment` (see {@link setSegment()}), `string $matchType` * (eg SegmentExpression::MATCH_EQUAL or any other match constant of this class) and `$segmentName`. * + * If the closure returns NULL, then Piwik assumes the segment sub-string will not match any visitor. + * * @param string|\Closure $sqlFilter * @api */ |