Skip to content

Commit

Permalink
make predicate optimization configurable
Browse files Browse the repository at this point in the history
[git-p4: depot-paths = "//open/mondrian/": change = 10052]
  • Loading branch information
Matt Campbell authored and Matt Campbell committed Oct 19, 2007
1 parent b1573a6 commit cd3f171
Show file tree
Hide file tree
Showing 6 changed files with 608 additions and 512 deletions.
30 changes: 30 additions & 0 deletions doc/configuration.html
Expand Up @@ -600,6 +600,36 @@ <h3>1.1 Property list<a name="Property_list">&nbsp;</a></h3>
database using the <code>mondrian.rolap. aggregates.Read</code> property
but will not be used unless this property is set to true.</p></td>
</tr>
<tr>
<td><code><a
href="api/mondrian/olap/MondrianProperties.html#OptimizePredicates">
mondrian.rolap.aggregates.optimizePredicates</a></code></td>
<td>boolean</td>
<td>true</td>
<td>Determines whether Mondrian optimizes predicates or not
<p>If set to true, Mondrian intelligently optimizes certain predicates.</p>
<p>If set to false, then predicates are optimized only when all the
members of a dimension are included.</p>

<p>Example:</p>

<p>For the in MDX query which selects all but one member of 1997 quarter:</p>
<p>
<code>select {[Time].[1997].[Q1],[Time].[1997].[Q2],[Time].[1997].[Q3]} on 0 from sales</code>
predicate optimization would result in sql that retrives all 4 quarters, instead of just 3.
The fourth quarter is cached along with others for future use:</p>

<p><code>...where`time_by_day`.`the_year` = 1997 group by
`time_by_day`.`the_year`, `time_by_day`.`quarter`...</code></p>
<p>(note the <code>where in</code> clause involving quarters is missing)</p>
<p>when predicate optimization is disabled, Mondrian would retrive no more data than specified by the query,
In the above case it would retrive only data for first 3 quarters:</p>

<p><code>...`time_by_day`.`the_year` = 1997 and `time_by_day`.`quarter` in ('Q1', 'Q2', 'Q3') group by `time_by_day`.`the_year`, `time_by_day`.`quarter`...</code></p>


</td>
</tr>
<tr>
<td><code><a href="api/mondrian/olap/MondrianProperties.html#ReadAggregates">
mondrian.rolap.aggregates.Read</a></code></td>
Expand Down
8 changes: 8 additions & 0 deletions mondrian.properties
Expand Up @@ -205,6 +205,14 @@ RoleXX='California manager';
# found will not be used.
#mondrian.rolap.aggregates.Read=false


###############################################################################
# Boolean property which determines whether Mondrian optimizes predicates and
# retrieve more data than specified in MDX query and cache it for future use
# If set to false mondrian would still optimize queries that involve all members
# of a dimension.
#mondrian.rolap.aggregates.optimizePredicates=true

###############################################################################
# Boolean property which controls pretty-print mode.
# If set to true, the all SqlQuery SQL strings
Expand Down

0 comments on commit cd3f171

Please sign in to comment.