db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bpendle...@apache.org
Subject svn commit: r887826 - in /db/derby/docs/trunk/src: adminguide/cadminspace21579.dita ref/rrefsyscsdiagtables.dita
Date Mon, 07 Dec 2009 03:12:48 GMT
Author: bpendleton
Date: Mon Dec  7 03:12:47 2009
New Revision: 887826

URL: http://svn.apache.org/viewvc?rev=887826&view=rev
Log:
DERBY-1160: Document use of SPACE_TABLE to display space that is recoverable

This change adds additional documentation to both the Admin guide and the
Reference guide. In the Admin guide, the change adds information about using
SPACE_TABLE to estimate the space that could be reclaimed. In the Reference
guide, the change adds information about the columns that are returned by
the SPACE_TABLE function; this information duplicates the information that
is in the engine Javadocs, but since we don't anticipate that users will
generally read the engine Javadocs, and since those docs are generated from
the development sources which may not match the behavior of SPACE_TABLE for a
particular release, I think it is reasonable to have that information
available in the Reference guide.


Modified:
    db/derby/docs/trunk/src/adminguide/cadminspace21579.dita
    db/derby/docs/trunk/src/ref/rrefsyscsdiagtables.dita

Modified: db/derby/docs/trunk/src/adminguide/cadminspace21579.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/adminguide/cadminspace21579.dita?rev=887826&r1=887825&r2=887826&view=diff
==============================================================================
--- db/derby/docs/trunk/src/adminguide/cadminspace21579.dita (original)
+++ db/derby/docs/trunk/src/adminguide/cadminspace21579.dita Mon Dec  7 03:12:47 2009
@@ -43,6 +43,19 @@
 recover all available space. The difference between the two procedures is
 that unlike SYSCS_COMPRESS_TABLE, the SYSCS_INPLACE_COMPRESS procedure uses
 no temporary files and moves rows around within the same conglomerate.</p>
+<p>
+You can use the SYSCS_DIAG.SPACE_TABLE diagnostic table to estimate the
+amount of unused space in a table or index by examining, in particular, the
+values of the NUMFREEPAGES and ESTIMSPACESAVING columns. For example:
+</p>
+<codeblock>
+SELECT * FROM TABLE(SYSCS_DIAG.SPACE_TABLE('APP', 'FLIGHTAVAILABILITY')) AS T
+</codeblock>
+<p>
+For more information about SYSCS_DIAG.SPACE_TABLE, see "SYSCS_DIAG
+diagnostic tables and functions" in the
+<cite><ph conref="../conrefs.dita#pub/citref"></ph></cite>.
+</p>
 <example><p>As an example, after you have determined that the FlightAvailability
 table and its related indexes have too much unused space, you could reclaim
 that space with the following command:</p><codeblock>call SYSCS_UTIL.SYSCS_COMPRESS_TABLE('APP',
'FLIGHTAVAILABILITY', 0);</codeblock><p> The

Modified: db/derby/docs/trunk/src/ref/rrefsyscsdiagtables.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsyscsdiagtables.dita?rev=887826&r1=887825&r2=887826&view=diff
==============================================================================
--- db/derby/docs/trunk/src/ref/rrefsyscsdiagtables.dita (original)
+++ db/derby/docs/trunk/src/ref/rrefsyscsdiagtables.dita Mon Dec  7 03:12:47 2009
@@ -167,7 +167,79 @@
 the SQL table function syntax. This diagnostic table function takes two arguments,
 the <parmname>schemaName</parmname> and the <parmname>tableName</parmname>.
 The <parmname>tableName</parmname> argument is required. If you do not specify
-the <parmname>schemaName</parmname>, the current schema is used. </p><p>For
+the <parmname>schemaName</parmname>, the current schema is used. </p>
+<p>
+The returned table has the following columns:
+<table pgwide="1" frame="all">
+    <tgroup cols="5" colsep="1" rowsep="1">
+        <colspec colname="1" colnum="1" colwidth="2784*"/>
+        <colspec colname="2" colnum="2" colwidth="2185*"/>
+        <colspec colname="3" colnum="3" colwidth="814*"/>
+        <colspec colname="4" colnum="4" colwidth="1003*"/>
+        <colspec colname="5" colnum="5" colwidth="2902*"/>
+<thead>
+<row>
+<entry align="left" colname="1" valign="bottom">Column Name</entry>
+<entry align="left" colname="2" valign="bottom">Type</entry>
+<entry align="left" colname="3" valign="bottom">Length</entry>
+<entry align="left" colname="4" valign="bottom">Nullability</entry>
+<entry align="left" colname="5" valign="bottom">Contents</entry>
+</row>
+</thead>
+<tbody>
+<row>
+<entry colname="1">CONGLOMERATENAME</entry>
+<entry colname="2">VARCHAR</entry>
+<entry colname="3">128</entry>
+<entry colname="4">true</entry>
+<entry colname="5">The name of the conglomerate, which is either the table name or
the index name. (Unlike the SYSCONGLOMERATES column of the same name, table ID's do not appear
here).</entry>
+</row>
+<row>
+<entry colname="1">ISINDEX</entry>
+<entry colname="2">SMALLINT</entry>
+<entry colname="3"></entry>
+<entry colname="4">false</entry>
+<entry colname="5">Is not zero if the conglomerate is an index, 0 otherwise.</entry>
+</row>
+<row>
+<entry colname="1">NUMALLOCATEDPAGES</entry>
+<entry colname="2">BIGINT</entry>
+<entry colname="3"></entry>
+<entry colname="4">false</entry>
+<entry colname="5">The number of pages actively linked into the table. The total number
of pages in the file is the sum of NUMALLOCATEDPAGES + NUMFREEPAGES.</entry>
+</row>
+<row>
+<entry colname="1">NUMFREEPAGES</entry>
+<entry colname="2">BIGINT</entry>
+<entry colname="3"></entry>
+<entry colname="4">false</entry>
+<entry colname="5">The number of free pages that belong to the table. When a new page
is to be linked into the table the system will move a page from the NUMFREEPAGES list to the
NUMALLOCATEDPAGES list. The total number of pages in the file is the sum of NUMALLOCATEDPAGES
+ NUMFREEPAGES.</entry>
+</row>
+<row>
+<entry colname="1">NUMUNFILLEDPAGES</entry>
+<entry colname="2">BIGINT</entry>
+<entry colname="3"></entry>
+<entry colname="4">false</entry>
+<entry colname="5">The number of unfilled pages that belong to the table. Unfilled
pages are allocated pages that are not completely full. Note that the number of unfilled pages
is an estimate and is not exact. Running the same query twice can give different results on
this column.</entry>
+</row>
+<row>
+<entry colname="1">PAGESIZE</entry>
+<entry colname="2">INTEGER</entry>
+<entry colname="3"></entry>
+<entry colname="4">false</entry>
+<entry colname="5">The size of the page in bytes for that conglomerate.</entry>
+</row>
+<row>
+<entry colname="1">ESTIMSPACESAVING</entry>
+<entry colname="2">BIGINT</entry>
+<entry colname="3"></entry>
+<entry colname="4">false</entry>
+<entry colname="5">The estimated space which could possibly be saved by compressing
the conglomerate, in bytes.</entry>
+</row>
+                    </tbody>
+                </tgroup>
+        </table></p>
+<p>For
 example, use the following query to return the space usage for all of the
 user tables and indexes in the database: <codeblock>SELECT T2.*
     FROM 



Mime
View raw message