Abhay Mannur wrote:
>
> Hi,
> I'm sure of the 6 dbspaces assigned to a perticular database.
> Also I'm sure that no other tables from any other databases are residing
> there.
> When I drop that database and look at the chunks, I get the following
> output.
[onstat -d output SNIPPED]
> I'm curious about the free pages in each chunk.
> Most of them show 3 used pages.
> Some of them has different number of used pages.
>
> Why is this ?
The amount of free space contained in a chunk when it is empty depends
on several factors. Those chunks showing only 3 pages used either have
never been used or are not the first chunk in the dbspace and contain
no overflow tablespace tablespace pages. Each chunk's first two pages
(pages 0 & 1) are unused and generally contain garbage but are counted
as used since they are never used. Page 2 is the chunk's ID page and
contains a page header identifying it as page 2 of chunk N and little
else. Hence the 3 used pages of any otherwise empty chunk. OK so the
chunks with more used space? The first chunk of a dbspace has
additional overhead pages including an initial tablespace tablespace
page and bitmap page. In addition if any tables or fragments were
created in the dbspace there will be pages used for each table's
tablespace tablespace entry which, while cleared, is not freed when the
table is dropped. If the first chunk of the dbspace is full and the
tablespace tablespace needs to be expanded to make room for some new
table's entry the tablespace tablespace will allocate a new extent in
another chunk which may explain why some none-first chunks have larger
minimum allocations. Hope that helps your understanding.
This is off the top of my head, but if you read carefully you can glean
all of this and the details from the Administrator's Guide.
> I want to drop these dbspaces. So before doing that, I want to know
> about 'em.
Art S. Kagel