× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



wrote on Mon, 06 Aug 2012 19:05:27 GMT:

A little extension to it though,
SELECT SYSTEM_TABLE_SCHEMA, SYSTEM_TABLE_NAME,
SYSTEM_TABLE_MEMBER, NUMBER_DELETED_ROWS, DATA_SIZE,
NUMBER_DELETED_ROWS * DATA_SIZE as DeletedSpace

I believe DATA_SIZE indicates all space consumed by data in the
table, so multiplying the number of deleted rows by the total
data space (in bytes) will exaggerate the amount of space
consumed by deleted records.

So, this may be even better:

SELECT SYS_DNAME, SYS_TNAME, SYS_MNAME, case when (AVGROWSIZE <>
-1) then deleted * avgrowsize / 1073741824 else
decimal(double(DELETED)/(DELETED + CARD) * 100 * SIZE /
1073741824,9,4) end as gigabytes_not_in_use FROM
QSYS2/SYSpartitionSTAT WHERE DELETED > 0 ORDER BY 4 desc

Looking at the Information Center for syspartitionstat, I see
that if rows are variable in length, average row size will be -1,
otherwise there will be a valid number of bytes for average row
size.

Sue

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.