× 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.



Good idea Susan.
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
FROM syspartitionstat
where number_deleted_rows>0
order by 6 desc

This will tell you the partition (or member) to reorganize.

If you're really bold you can build a UDF to call RGZPFM and automatically
execute the reorg. We have a UDF called QCMD we use for such things. A
DB purist might suggest, since you're reorganizing the file anyway, it
might be a good time to sort it and either add KEYFILE(*FILE) or your
favorite logical to that also. Then, if you think about it, it starts
getting complicated. Like, what if the *FILE has no key? Or how to
select the idea index or logical file?

There's the homework assignment of the day: Is there a table of database
statistics which shows you the most popular index used against a table?
Could this be used by a program to feed RGZPFM?




Rob Berendt

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.