leafPages = 0,
emptyPages = 0,
deletedPages = 0;
- double usedSpace = 0.0;
+ double usedSpace = 0.0,
+ usedLeafSpace = 0.0,
+ usedInnerSpace = 0.0;
char res[1024];
int bufferSize = -1;
int64 innerTuples = 0,
pageFree = PageGetExactFreeSpace(page);
usedSpace += bufferSize - pageFree;
+ if (SpGistPageIsLeaf(page))
+ usedLeafSpace += bufferSize - pageFree;
+ else
+ usedInnerSpace += bufferSize - pageFree;
if (pageFree == bufferSize)
emptyPages++;
"leafPages: %u\n"
"emptyPages: %u\n"
"usedSpace: %.2f kbytes\n"
+ "usedInnerSpace: %.2f kbytes\n"
+ "usedLeafSpace: %.2f kbytes\n"
"freeSpace: %.2f kbytes\n"
"fillRatio: %.2f%%\n"
"leafTuples: " INT64_FORMAT "\n"
"innerRedirects: " INT64_FORMAT,
totalPages, deletedPages, innerPages, leafPages, emptyPages,
usedSpace / 1024.0,
+ usedInnerSpace / 1024.0,
+ usedLeafSpace / 1024.0,
(((double) bufferSize) * ((double) totalPages) - usedSpace) / 1024,
100.0 * (usedSpace / (((double) bufferSize) * ((double) totalPages))),
leafTuples, innerTuples, nAllTheSame,