Subject Re: [firebird-support] size of tables (bytes) - not via rdb$pages?
Author Ann W. Harrison
unordained wrote:

> It looks like rdb$pages only contains "important" pages needed by the
> engine, not a full catalogue of all pages currently allocated.

Actually, it's a complete list of the Pointer Pages for a table.
Check the ibphoenix knowledge base for a great deal of information
about Pointer Pages. Essentially, they're arrays of the page
numbers of primary Data Pages. You can get a rough guess of the
number of data pages by multiplying the number of Pointer Pages
by the page size and dividing by four. That's very rough, because
some of the slots are likely to be empty. Nor will it tell you
how many blob pages or overflow pages the table uses, nor anything
about indexes.
>
> I was looking for a way to get an idea of how many pages each
> table was using (data, index, and optionally blob?)

Here you want gstat. It tells you everything you need to know
about page use by table, including page fill distribution for
data and indexes, and, with the -r switch, space used by old
versions of records.

> ... Since we can't
> break out each table into an individual file, we can't just use the filesystem for that.

Nor would you want to.
>

Cheers,

Ann