Github user DaveBirdsall commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/30#discussion_r34824459
--- Diff: core/sql/ustat/hs_globals.cpp ---
@@ -5364,9 +5368,31 @@ Lng32 HSGlobalsClass::CollectStatistics()
//
ISMemPercentage_ =
(float)CmpCommon::getDefaultNumeric(USTAT_IS_MEMORY_FRACTION);
- NABoolean trySampleTableBypassForIS = useSampling && multiGroup ==
NULL &&
- externalSampleTable == FALSE;
- // Don't bypass sampling for internal sort when MC stats
requested.
+ NABoolean trySampleTableBypassForIS = useSampling &&
externalSampleTable == FALSE;
+
+ mapInternalSortTypes(singleGroup);
+ Int64 maxRowsToRead = getInternalSortMemoryRequirements(TRUE);
+ // row count may be adjusted up if DP2 sampling and heavy amount
of varchars.
+
+ if (trySampleTableBypassForIS && multiGroup ) {
+
+ if (CmpCommon::getDefault(USTAT_USE_INTERNAL_SORT_FOR_MC) ==
DF_ON &&
+ allGroupsFitInMemory())
+ {
+ // if both single and MC groups can fit in memory, turn on
+ // performing MC in memory flag.
+ //
+ // Do not have to set the flag for next call to this
function
+ // (HSGlobalsClass::CollectStatistics()) since it is not
static and
+ // therefore a new HSGlobalsClass object will be
constructed.
+ // In HSGlobalsClass::HSGlobalsClass(), the flag is set to
FALSE.
+ setPerformISForMC(TRUE);
--- End diff --
OK, I think this likely answers my previous question
---
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 [email protected] or file a JIRA ticket
with INFRA.
---