On 2011-08-20 03:39, Desmodromic wrote:
Quote:
I suspect that the containers of certain tablespaces in our DB2 9.5
FP7 database are very fragmented. What I believe has happened is that
the tablespaces have been created small in size with AUTORESIZE YES
and a very small INCREASESIZE.
What I would like to obtain for each tablespace, since it was created,
is a report of the initial size and the size and number of all
subsequent extends (automatic and manual).
Does anyone know if this can be done? |
I don't know the answer to your question, but I would suggest that you
focus on the tables in the tablespace (AFAIK you can't do much about it
at tablespace level anyhow). The need for reorg on tables can be
determined by the amount of overflow in each table. Something like:
select a.tabname, a.rows_read, a.overflow_accesses,
cast(((a.overflow_accesses * 100.0) / nullif(a.rows_read, 0))
as decimal (5,2)) AS percent_overflow_reads
from sysibmadm.snaptab a
join syscat.tables b
on (a.tabschema, a.tabname) = (b.tabschema, b.tabname)
where b.tbspace = ? order by 4 desc
A rule of thumb is 3%
/Lennart