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:

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;


Constructor Index

 o SpaceTable(String)
 
 o SpaceTable(String, String)
 

Method Index

 o close()
 
 o getBoolean(int)
 
 o getEstimatedCostPerInstantiation(VTIEnvironment)
 
 o getEstimatedRowCount(VTIEnvironment)
 
 o getInt(int)
 
 o getLong(int)
 
 o getMetaData()
 
 o getString(int)
 
 o next()
 
 o supportsMultipleInstantiations(VTIEnvironment)
 
 o wasNull()
 

Constructor Detail

 o SpaceTable
public SpaceTable(java.lang.String schemaName,
                  java.lang.String tableName)
 o SpaceTable
public SpaceTable(java.lang.String tableName)

Method Detail

 o getMetaData
public java.sql.ResultSetMetaData getMetaData()
See Also:
getMetaData
 o next
public boolean next() throws java.sql.SQLException
Throws:
java.sql.SQLException - if no transaction context can be found
See Also:
next
 o close
public void close()
See Also:
close
 o getString
public java.lang.String getString(int columnNumber)
Overrides:
getString in class VTITemplate
See Also:
getString
 o getLong
public long getLong(int columnNumber)
Overrides:
getLong in class VTITemplate
See Also:
getLong
 o getBoolean
public boolean getBoolean(int columnNumber)
Overrides:
getBoolean in class VTITemplate
See Also:
getBoolean
 o getInt
public int getInt(int columnNumber)
Overrides:
getInt in class VTITemplate
See Also:
getInt
 o wasNull
public boolean wasNull()
Overrides:
wasNull in class VTITemplate
See Also:
wasNull
 o getEstimatedRowCount
public double getEstimatedRowCount(VTIEnvironment vtiEnvironment)
See Also:
getEstimatedRowCount
 o getEstimatedCostPerInstantiation
public double getEstimatedCostPerInstantiation(VTIEnvironment vtiEnvironment)
See Also:
getEstimatedCostPerInstantiation
 o supportsMultipleInstantiations
public boolean supportsMultipleInstantiations(VTIEnvironment vtiEnvironment)
Returns:
true
See Also:
supportsMultipleInstantiations

  Class Hierarchy    Previous  Next  Index