Re: No. of Extents
Posted in 1998
In article <m8o8jDAfYWo1EwKE@smooth1.demon.co.uk>, David Williams
<djw@smooth1.demon.co.uk> writes
>In article <35A0D7E3.4263@bloomberg.net>, Art S. Kagel
><kagel@bloomberg.net> writes
>>colin quadros wrote:
>>>
>>> Can anyone tell how to cslculate the number of extents in a table in a
>>> 5.X environment..?? Also, if we know the number of rows,columns and
>>tbcheck -pe -OR- tbcheck -pt database:table
>>
>>> indexes in a table , how do you find the "right" first extent size and
>>> next extent size..??
>>
Running "oncheck -pt dbname:tabname | head -21" will quickly give some
of this information, hopefully "tbcheck -pt" does the same, like:-
row size
number of keys (indices)
number of extents
first extent size
next extent size
number of pages allocated
number of pages used
number of pages for data
number of rows
current serial value
Take "number of pages allocated" and times it by two to get the value
into KB (obviously), add 10%/20% for growth (you need to determine this
growth factor as Art previously discussed). Now you know how much to
specify on your "create table" statement in order to get everything into
a single extent.
I have a script called "checkpt" so that I can quickly run a health
check on a suspect table ($1 dbname:$2 tabname):
oncheck -pt $1:$2 | head -21>
--
Simon Barber