db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chaa...@apache.org
Subject svn commit: r1355150 - /db/derby/docs/branches/10.9/src/ref/rrefsyscsdiagtables.dita
Date Thu, 28 Jun 2012 20:32:35 GMT
Author: chaase3
Date: Thu Jun 28 20:32:34 2012
New Revision: 1355150

URL: http://svn.apache.org/viewvc?rev=1355150&view=rev
Log:
DERBY-5822  Document the new SQL standard behavior of the SPACE_TABLE vti

Merged DERBY-5822.diff to 10.9 docs branch from trunk revision 1355117.

Modified:
    db/derby/docs/branches/10.9/src/ref/rrefsyscsdiagtables.dita

Modified: db/derby/docs/branches/10.9/src/ref/rrefsyscsdiagtables.dita
URL: http://svn.apache.org/viewvc/db/derby/docs/branches/10.9/src/ref/rrefsyscsdiagtables.dita?rev=1355150&r1=1355149&r2=1355150&view=diff
==============================================================================
--- db/derby/docs/branches/10.9/src/ref/rrefsyscsdiagtables.dita (original)
+++ db/derby/docs/branches/10.9/src/ref/rrefsyscsdiagtables.dita Thu Jun 28 20:32:34 2012
@@ -182,10 +182,18 @@ to determine if space might be saved by 
 <p>All users can access this diagnostic table function, whether or not the
 database has authentication and SQL authorization enabled.</p>
 <p>To access the SYSCS_DIAG.SPACE_TABLE diagnostic table function, you must use
-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>
+the SQL table function syntax. You can invoke the table function in the
+following ways:
+<ul>
+<li>If invoked with no arguments, the table function retrieves
+space information for all tables and indexes in the database.</li>
+<li>If invoked with one argument, a <parmname>tableName</parmname>, the
table
+function retrieves information for the specified table in the current
+schema.</li>
+<li>If invoked with two arguments, a <parmname>schemaName</parmname> followed
by
+a <parmname>tableName</parmname>, the table function retrieves information for
+the specified schema and table.</li>
+</ul></p>
 <p>The returned table has the columns shown in the following table.</p>
 <table frame="all">
 <title>Columns returned by the SYSCS_DIAG.SPACE_TABLE function</title>
@@ -254,16 +262,25 @@ the <parmname>schemaName</parmname>, the
 <entry colname="4">false</entry>
 <entry colname="5">The estimated space which could possibly be saved by compressing
the conglomerate, in bytes.</entry>
 </row>
+<row>
+<entry colname="1">TABLEID</entry>
+<entry colname="2">CHAR</entry>
+<entry colname="3">36</entry>
+<entry colname="4">false</entry>
+<entry colname="5">The id of the table to which the conglomerate belongs. </entry>
+</row>
 </tbody>
 </tgroup>
 </table>
-<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 
+<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
         SYS.SYSTABLES systabs,
-        TABLE (SYSCS_DIAG.SPACE_TABLE(systabs.tablename)) AS T2
-    WHERE systabs.tabletype = 'T'</codeblock>where T2 is a user-specified
+        TABLE (SYSCS_DIAG.SPACE_TABLE()) AS T2
+    WHERE systabs.tabletype = 'T'
+    AND systabs.tableid = T2.tableid;</codeblock>
+where T2 is a user-specified
 table name that is any valid identifier. </p><p>Both the <parmname>schemaName</parmname>
and
 the <parmname>tableName</parmname> arguments must be expressions whose data
 types map to Java strings. If the <parmname>schemaName</parmname> and the <parmname>tableName</parmname>
are



Mime
View raw message