trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DaveBirdsall <...@git.apache.org>
Subject [GitHub] trafodion pull request #1403: [TRAFODION-2913] Tweak some MDAM-related heuri...
Date Wed, 17 Jan 2018 17:34:15 GMT
GitHub user DaveBirdsall opened a pull request:

    https://github.com/apache/trafodion/pull/1403

    [TRAFODION-2913] Tweak some MDAM-related heuristics

    There are two changes in this pull request.
    
    1. The default value for CQD MDAM_SELECTION_DEFAULT has been changed from 0.5 to 8.0.
This is a recalibration of this default; it had not been changed since predecessor product
days. The old value resulted in MDAM not being considered at times when it is the better plan.
Details of how this recalibration was done will be documented in the JIRA.
    
    2. The heuristic implemented by IndexDesc::pruneMdam is now limited to index elimination
logic and no longer used by the scan optimizer. As a practical matter this was already true
in most circumstances: ScanOptimizer::getMdamStatus ignored the mdamFlag when CQD RANGESPEC_TRANSFORMATION
is set to 'ON'. (And 'ON' is the default value for that CQD.) The one case when this was not
true was if CQD FSO_IN_USE was set to '0'. So, ironically, when the user is trying to encourage
MDAM using CQD FSO_IN_USE, we would pay attention to this heuristic that prevents MDAM.
    
    It should be noted that the heuristic in IndexDesc::pruneMdam depends on counting the
number of leading columns without a key predicate. It does so without taking into account
parallelization, which means it does not see potential equality predicates on a leading "_SALT_"
column, which can cause it to reject MDAM when MDAM would be useful. Even so, the heuristic
there seems reasonable for narrowing the set of indexes that we might consider so it is still
good for index elimination purposes though not perfect. But once an index is being considered,
it is better to let the costing code, which does know about parallelization, to have the final
word.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/DaveBirdsall/trafodion Trafodion2913

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/trafodion/pull/1403.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1403
    
----
commit ae17030878f48aab2be36db7a57d7b11c2413016
Author: Dave Birdsall <dbirdsall@...>
Date:   2018-01-17T17:22:24Z

    [TRAFODION-2913] Tweak some MDAM-related heuristics

----


---

Mime
View raw message