"Sort Space Type": "Memory",
"Peak Memory Usage": 0,
"Original Hash Batches": 0,
+ "Original Hash Buckets": 0,
"Hash Batches": 0,
"Hash Buckets": 0,
"Rows Removed by Filter": 0,
{P_SortSpaceType, "S" ,"Sort Space Type", NULL, false, conv_sortspacetype,SETTER(sort_space_type)},
{P_PeakMemoryUsage, "T" ,"Peak Memory Usage", NULL, false, NULL, SETTER(peak_memory_usage)},
{P_OrgHashBatches, "U","Original Hash Batches",NULL, false, NULL, SETTER(org_hash_batches)},
+ {P_OrgHashBuckets, "*","Original Hash Buckets",NULL, false, NULL, SETTER(org_hash_buckets)},
{P_HashBatches, "V" ,"Hash Batches", NULL, false, NULL, SETTER(hash_batches)},
{P_HashBuckets, "W" ,"Hash Buckets", NULL, false, NULL, SETTER(hash_buckets)},
{P_RowsFilterRmvd, "X" ,"Rows Removed by Filter",NULL,false,NULL, SETTER(filter_removed)},
P_SortSpaceType,
P_PeakMemoryUsage,
P_OrgHashBatches,
+ P_OrgHashBuckets,
P_HashBatches,
P_HashBuckets,
P_RowsFilterRmvd,
DEFAULT_SETTER(idxrchk_removed);
DEFAULT_SETTER(peak_memory_usage);
DEFAULT_SETTER(org_hash_batches);
+DEFAULT_SETTER(org_hash_buckets);
DEFAULT_SETTER(hash_batches);
DEFAULT_SETTER(hash_buckets);
DEFAULT_SETTER(actual_startup_time);
if (!ISZERO(v->hash_buckets))
{
+ bool show_original = false;
+
appendStringInfoString(s, "\n");
appendStringInfoSpaces(s, TEXT_INDENT_DETAILS(level, exind));
appendStringInfoString(s, "Buckets: ");
appendStringInfoString(s, v->hash_buckets);
+
+ /* See show_hash_info() in explain.c for details */
+ if ((v->org_hash_buckets &&
+ strcmp(v->hash_buckets, v->org_hash_buckets) != 0) ||
+ (v->org_hash_batches &&
+ strcmp(v->hash_batches, v->org_hash_batches) != 0))
+ show_original = true;
+
+ if (show_original && v->org_hash_buckets)
+ {
+ appendStringInfoString(s, " (originally ");
+ appendStringInfoString(s, v->org_hash_buckets);
+ appendStringInfoChar(s, ')');
+ }
+
if (!ISZERO(v->hash_batches))
{
appendStringInfoString(s, " Batches: ");
appendStringInfoString(s, v->hash_batches);
- if (v->org_hash_batches &&
- strcmp(v->hash_batches, v->org_hash_batches) != 0)
+ if (show_original && v->org_hash_batches)
{
appendStringInfoString(s, " (originally ");
appendStringInfoString(s, v->org_hash_batches);
const char *setopcommand;
const char *join_type;
const char *org_hash_batches;
+ const char *org_hash_buckets;
const char *peak_memory_usage;
const char *startup_cost;
const char *total_cost;
SETTERDECL(hash_buckets);
SETTERDECL(hash_batches);
SETTERDECL(org_hash_batches);
+SETTERDECL(org_hash_buckets);
SETTERDECL(peak_memory_usage);
SETTERDECL(filter_removed);
SETTERDECL(idxrchk_removed);