Table_Debug

Wallen, Alan

> Neither table has compression set. The defaults for the parameters that 
> you mention were retained in the COPYDB script. I presume that the same 
> defaults are used when a table is created as B-Tree unique via INGMENU. 
> Looking at the HELP TABLE for these two tables I do see that the smaller
> table is 21828 pages while the larger table is 26051 pages.
> (By the way, I don't see a Help command that provides the fine detail of
> table structure that these parameters defined. Would you know if there is
> a command to retrieve this information?)



From: LeAnne Jergensen leanne.jergensen@eds.com
Subject: Re: COPYDB and table size

To look at the full definition of the table use the little known command:
modify tablename to table_debug with table_option=<1 or 2 or 3>.


Example:
Show part of table layout for BTREE table country:


modify country to table_debug with table_option = 1

********************************************************************

FHDR for TABLE: country @ Pageno: 13, Highwater FMAP: 1, FMAP's: 1
        Allocation: 4, Extend: 16, Number of Extends: 0

Last disc pageno: 19, Last FHDR/FMAP(s) pageno: 19
        Last used pageno 14, Pages never used: 5

FMAP[0] @ Pageno: 14, Base Pageno: 0
        First free bit: 15, Highwater bit: 14
        Last Free bit: 19, Free Pages: 5, FHDR Hint: YES

         127    00000000 00000000 00000000 000F8000           0

********************************************************************

Show part of table layout for ISAM table employee:


modify employee to table_debug with table_option = 1

********************************************************************

FHDR for TABLE: employee @ Pageno: 591, Highwater FMAP: 1, FMAP's: 1
        Allocation: 16, Extend: 16, Number of Extends: 0

Last disc pageno: 607, Last FHDR/FMAP(s) pageno: 607
        Last used pageno 592, Pages never used: 15

FMAP[0] @ Pageno: 592, Base Pageno: 0
        First free bit: 165, Highwater bit: 592
        Last Free bit: 607, Free Pages: 185, FHDR Hint: YES

         255    FFFFFFFF FFFFFFFF FFFFFFE0 00000000         128
         383    00000000 00007FFF FFFFFFFF FFFFFFFF         256
         639    00000000 FFFE0000 00000000 00000000         512

********************************************************************

Show the other part of table layout for BTREE table country:


modify country to table_debug with table_option = 2

********************************************************************

PAGE type DUMP for TABLE: country, Total pages: 20

           0 rLDDDDDDAL DDAHMUUUUU

********************************************************************



Show the other part of table layout for ISAM table employee:


modify employee to table_debug with table_option = 2

********************************************************************

PAGE type DUMP for TABLE: employee, Total pages: 608

           0 DDDDDDDDDD DDDDDDDDDD DDDDDDDDDD DDDDDDDDDD DDDDDDDDDD
          50 DDDDDDDDDD DDDDDDDDDD DDDDDDDDDD DDDDDDDDDD DDDDDDDDDD
         100 DDDDDDDDDD DDDDDDDDDD DDDDDDDDDD DDDDDDDDDD DDDDDDDDDD
         150 DDDDDDDDDD DDDDDFFFFF FFFFFFFFFF FFFFFFFFFF FFFFFFFFFF
         200 FFFFFFFFFF FFFFFFFFFF FFFFFFFFFF FFFFFFFFFF FFFFFFFFFF
         250 FFFFFFFFFF FFFFFFFFFF FFFFFFFFFF FFFFFFFFFF FFFFFFFFFF
         300 FFFFFFFFFF FFFFFFFFFF FFFFFFFFFF FFFFFooooo oooooooooo
         350 oooooooooo oooooooooo oooooooooo oooooooooo oooooooooo
         400 oooooooooo oooooooooo oooooooooo oooooooooo oooooooooo
         450 oooooooooo oooooooooo oooooooooo oooooooooo oooooooooo
         500 oooooooooo oooooooooo oooooooooo oooooooooo oooooooooo
         550 oooooooooo oooooooooo oooooooooo oooooooooo rHMUUUUUUU
         600 UUUUUUUU

********************************************************************

Show complete table layout for a table:


modify tablename to table_debug with table_option = 3

(shows both what 1 and 2 show)


Modify to table_debug is an unsupported utility

FHDR Information
Pageno            = Page number of the Free Header Page
Highwater FMAP    = FMAP number of the highest FMAP in table
FMAP(s)           = The number of FMAPS in the table
Allocation        = The total size of the table in pages
Extend            = The table's extend size in pages
Number of extends = Number of times the table has been extended
Last disc pageno  = Last physical page on disk
Last FHDR/FMAP    = The number of pages the FHDR/FMAP that the FHDR/FMAP
think are allocated to the table
Last used pageno  = Highest page in the table where there exists a valid
OpenINGRES page
Pages never used  = Number of pages never written to

FMAP Information (Displayed once per map)
FMAP pageno       = Page number of the FMAP
Base page number  = The base page number of the range of pages that this
FMAP spans
First free bit    = A hint as to where the first free page can be found in
the FMAP
Highwater bit     = The highest numbered page ever written to the FMAP
Last free bit     = The last free page which has been allocated disk space
within the FMAP
Free Pages        = The number of free pages within the FMAP that have disk
space allocated to them

FHDR Hint
In each FHDR page, there is a hint for each of the FMAPS it controls
to say whether or not that FMAP contains free pages

FMAP Bitmap Dump
Each FMAP maps 16000 pages, and there is one bit per page. A value
of 1 indicates a free page, 0 is a used page.
The bits are displayed in Hex form to reduce the output


Page Type Dump Information
The usage of each page in the table is displayed by characters with the
following meanings
**H = Free Header Page
**M = Free Map Page
**F = Free page, a page that has been used but has subsequently been made
free
**r = Root Page
**i = Index Page
**s = Sprig Page
**L = Leaf page
**O = Overflow Leaf page
**o = Overflow data page
**A = Associated Data Page
**D = Data Page
**U = Unused Page, a page that has never been written to

Hope that helps clear up why the difference in size.

LeAnne Jergensen
Ingres Q & A
Back to William's Home Page

© William Yuan 2000

Email William