|
|
|
|
@ -2676,7 +2676,7 @@ show_sort_info(SortState *sortstate, ExplainState *es) |
|
|
|
|
TuplesortInstrumentation stats; |
|
|
|
|
const char *sortMethod; |
|
|
|
|
const char *spaceType; |
|
|
|
|
long spaceUsed; |
|
|
|
|
int64 spaceUsed; |
|
|
|
|
|
|
|
|
|
tuplesort_get_stats(state, &stats); |
|
|
|
|
sortMethod = tuplesort_method_name(stats.sortMethod); |
|
|
|
|
@ -2686,7 +2686,7 @@ show_sort_info(SortState *sortstate, ExplainState *es) |
|
|
|
|
if (es->format == EXPLAIN_FORMAT_TEXT) |
|
|
|
|
{ |
|
|
|
|
ExplainIndentText(es); |
|
|
|
|
appendStringInfo(es->str, "Sort Method: %s %s: %ldkB\n", |
|
|
|
|
appendStringInfo(es->str, "Sort Method: %s %s: " INT64_FORMAT "kB\n", |
|
|
|
|
sortMethod, spaceType, spaceUsed); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
@ -2715,7 +2715,7 @@ show_sort_info(SortState *sortstate, ExplainState *es) |
|
|
|
|
TuplesortInstrumentation *sinstrument; |
|
|
|
|
const char *sortMethod; |
|
|
|
|
const char *spaceType; |
|
|
|
|
long spaceUsed; |
|
|
|
|
int64 spaceUsed; |
|
|
|
|
|
|
|
|
|
sinstrument = &sortstate->shared_info->sinstrument[n]; |
|
|
|
|
if (sinstrument->sortMethod == SORT_TYPE_STILL_IN_PROGRESS) |
|
|
|
|
@ -2731,7 +2731,7 @@ show_sort_info(SortState *sortstate, ExplainState *es) |
|
|
|
|
{ |
|
|
|
|
ExplainIndentText(es); |
|
|
|
|
appendStringInfo(es->str, |
|
|
|
|
"Sort Method: %s %s: %ldkB\n", |
|
|
|
|
"Sort Method: %s %s: " INT64_FORMAT "kB\n", |
|
|
|
|
sortMethod, spaceType, spaceUsed); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
@ -2795,23 +2795,23 @@ show_incremental_sort_group_info(IncrementalSortGroupInfo *groupInfo, |
|
|
|
|
|
|
|
|
|
if (groupInfo->maxMemorySpaceUsed > 0) |
|
|
|
|
{ |
|
|
|
|
long avgSpace = groupInfo->totalMemorySpaceUsed / groupInfo->groupCount; |
|
|
|
|
int64 avgSpace = groupInfo->totalMemorySpaceUsed / groupInfo->groupCount; |
|
|
|
|
const char *spaceTypeName; |
|
|
|
|
|
|
|
|
|
spaceTypeName = tuplesort_space_type_name(SORT_SPACE_TYPE_MEMORY); |
|
|
|
|
appendStringInfo(es->str, " Average %s: %ldkB Peak %s: %ldkB", |
|
|
|
|
appendStringInfo(es->str, " Average %s: " INT64_FORMAT "kB Peak %s: " INT64_FORMAT "kB", |
|
|
|
|
spaceTypeName, avgSpace, |
|
|
|
|
spaceTypeName, groupInfo->maxMemorySpaceUsed); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (groupInfo->maxDiskSpaceUsed > 0) |
|
|
|
|
{ |
|
|
|
|
long avgSpace = groupInfo->totalDiskSpaceUsed / groupInfo->groupCount; |
|
|
|
|
int64 avgSpace = groupInfo->totalDiskSpaceUsed / groupInfo->groupCount; |
|
|
|
|
|
|
|
|
|
const char *spaceTypeName; |
|
|
|
|
|
|
|
|
|
spaceTypeName = tuplesort_space_type_name(SORT_SPACE_TYPE_DISK); |
|
|
|
|
appendStringInfo(es->str, " Average %s: %ldkB Peak %s: %ldkB", |
|
|
|
|
appendStringInfo(es->str, " Average %s: " INT64_FORMAT "kB Peak %s: " INT64_FORMAT "kB", |
|
|
|
|
spaceTypeName, avgSpace, |
|
|
|
|
spaceTypeName, groupInfo->maxDiskSpaceUsed); |
|
|
|
|
} |
|
|
|
|
@ -2829,7 +2829,7 @@ show_incremental_sort_group_info(IncrementalSortGroupInfo *groupInfo, |
|
|
|
|
|
|
|
|
|
if (groupInfo->maxMemorySpaceUsed > 0) |
|
|
|
|
{ |
|
|
|
|
long avgSpace = groupInfo->totalMemorySpaceUsed / groupInfo->groupCount; |
|
|
|
|
int64 avgSpace = groupInfo->totalMemorySpaceUsed / groupInfo->groupCount; |
|
|
|
|
const char *spaceTypeName; |
|
|
|
|
StringInfoData memoryName; |
|
|
|
|
|
|
|
|
|
@ -2846,7 +2846,7 @@ show_incremental_sort_group_info(IncrementalSortGroupInfo *groupInfo, |
|
|
|
|
} |
|
|
|
|
if (groupInfo->maxDiskSpaceUsed > 0) |
|
|
|
|
{ |
|
|
|
|
long avgSpace = groupInfo->totalDiskSpaceUsed / groupInfo->groupCount; |
|
|
|
|
int64 avgSpace = groupInfo->totalDiskSpaceUsed / groupInfo->groupCount; |
|
|
|
|
const char *spaceTypeName; |
|
|
|
|
StringInfoData diskName; |
|
|
|
|
|
|
|
|
|
|