Class Hierarchy Previous Next Index
Class COM.cloudscape.vti.SpaceTable
java.lang.Object
|
+----COM.cloudscape.vti.VTITemplate
|
+----COM.cloudscape.vti.SpaceTable
- public class SpaceTable
- extends VTITemplate
- implements VTICosting
Copyright © 1998-2000, Informix Software, Inc. All rights reserved.
SpaceTable is a virtual table which shows the space usage of a particular
table and its indexes. This virtual table can be invoked by calling it
directly, and supplying the schema name and table name as arguments.
select * from new COM.cloudscape.vti.SpaceTable('MYSCHEMA','MYTABLE') t;
If the schema name is not supplied, the default schema is used.
select * from new COM.cloudscape.vti.SpaceTable('MYTABLE') t;
Alternatively, the table can be invoked through the system alias SpaceTable
select * from new SpaceTable('MYTABLE') t;
NOTE: Both the schema name and the table name must be any expression that evaluates to a
string data type. If you created a schema or table name as a non-delimited identifier,
you must present their names in all upper case.
The SpaceTable virtual table can be used to estimate whether space
might be saved by compressing a table and its indexes.
The SpaceTable virtual table has the following columns:
- CONGLOMERATENAME varchar(128) - nullable. 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).
- ISINDEX boolean - not nullable. Is true if the conglomerate is an index,
false otherwise.
- NUMALLOCATEDPAGES longint - not nullable. The number of allocated pages that belong to
the table.
- NUMFREEPAGES longint - not nullable. The number of free pages that belong to the table.
- NUMUNFILLEDPAGES longint - not nullable. 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.
- PAGESIZE integer - not nullable. The size of the page in bytes for that conglomerate.
- ESTIMSPACESAVING longint - not nullable. The estimated space which could possibly be saved
by compressing the conglomerate, in bytes.
To get space information on all schemas and tables, use a query such as
select v.*
from SYS.SYSSCHEMAS s,
SYS.SYSTABLES t,
new COM.cloudscape.vti.SpaceTable(SCHEMANAME,TABLENAME) v
where s.SCHEMAID = t.SCHEMAID;
SpaceTable(String)
-
SpaceTable(String, String)
-
close()
-
getBoolean(int)
-
getEstimatedCostPerInstantiation(VTIEnvironment)
-
getEstimatedRowCount(VTIEnvironment)
-
getInt(int)
-
getLong(int)
-
getMetaData()
-
getString(int)
-
next()
-
supportsMultipleInstantiations(VTIEnvironment)
-
wasNull()
-
SpaceTable
public SpaceTable(java.lang.String schemaName,
java.lang.String tableName)
SpaceTable
public SpaceTable(java.lang.String tableName)
getMetaData
public java.sql.ResultSetMetaData getMetaData()
- See Also:
- getMetaData
next
public boolean next() throws java.sql.SQLException
- Throws:
- java.sql.SQLException - if no transaction context can be found
- See Also:
- next
close
public void close()
- See Also:
- close
getString
public java.lang.String getString(int columnNumber)
- Overrides:
- getString in class VTITemplate
- See Also:
- getString
getLong
public long getLong(int columnNumber)
- Overrides:
- getLong in class VTITemplate
- See Also:
- getLong
getBoolean
public boolean getBoolean(int columnNumber)
- Overrides:
- getBoolean in class VTITemplate
- See Also:
- getBoolean
getInt
public int getInt(int columnNumber)
- Overrides:
- getInt in class VTITemplate
- See Also:
- getInt
wasNull
public boolean wasNull()
- Overrides:
- wasNull in class VTITemplate
- See Also:
- wasNull
getEstimatedRowCount
public double getEstimatedRowCount(VTIEnvironment vtiEnvironment)
- See Also:
- getEstimatedRowCount
getEstimatedCostPerInstantiation
public double getEstimatedCostPerInstantiation(VTIEnvironment vtiEnvironment)
- See Also:
- getEstimatedCostPerInstantiation
supportsMultipleInstantiations
public boolean supportsMultipleInstantiations(VTIEnvironment vtiEnvironment)
- Returns:
- true
- See Also:
- supportsMultipleInstantiations
Class Hierarchy Previous Next Index