You are viewing a plain text version of this content. The canonical link for it is here.
Posted to codereview@trafodion.apache.org by DaveBirdsall <gi...@git.apache.org> on 2017/03/15 20:50:06 UTC
[GitHub] incubator-trafodion pull request #1012: [TRAFODION-2537] Add file_desc to sa...
GitHub user DaveBirdsall opened a pull request:
https://github.com/apache/incubator-trafodion/pull/1012
[TRAFODION-2537] Add file_desc to salted secondary indexes indexes_desc
The problem was a query on a large table with a salted index chose a serial plan when a parallel plan on the salted index would have been superior.
The cause was a bit of missing logic. Function createNAFileSets (optimizer/NATable.cpp) relies on the presence of a files descriptor in the indexes descriptor to deduce that an index is salted. The code that generates these descriptors, Generator::createVirtualTableDesc (generator/Generator.cpp) however only creates a files descriptor for the clustering key or primary key indexes descriptor. So, the fix was to add logic to Generator::createVirtualTableDesc to create a files descriptor when a secondary index is salted.
Note that the only form of salting supported on indexes today is SALT LIKE TABLE. If in the future we add support for salting an index on a different set of columns and a different set of partitions than the table, many additional changes will be needed.
Two regression tests show changes in plan as a result of this change. In both cases, index scans that formerly were serial are now parallel. (Note: The one plan change for seabase/EXPECTED010 is near the bottom.)
See the JIRA for a discussion of the performance implications of this change.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/DaveBirdsall/incubator-trafodion Trafodion2537
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-trafodion/pull/1012.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 #1012
----
commit e5e1356bf1ea70ee4b23d4e921a218f40cdf8577
Author: Dave Birdsall <db...@apache.org>
Date: 2017-03-15T20:42:58Z
[TRAFODION-2537] Add file_desc to salted secondary indexes indexes_desc
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-trafodion pull request #1012: [TRAFODION-2537] Add file_desc to sa...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/incubator-trafodion/pull/1012
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---