Cloudscape Properties
Page 17 of 47

cloudscape.jdbc.metadataStoredPreparedStatements

Function

Cloudscape's local JDBC driver has built-in queries for the JDBC DatabaseMetaData methods that supply information about the Cloudscape system. These methods are useful for applications working with generic DBMSs, such as database tools.

The cloudscape.jdbc.metadataStoredPreparedStatements property configures the JDBC driver to take advantage of stored prepared statements to avoid preparing these queries each time a system starts up.

When configured to use stored prepared statements, the JDBC driver stores all JDBC metadata stored prepared statements, which are placed in the SYS schema. JDBC metadata queries are duplicated in every Cloudscape database even if a single Cloudscape instance manages several databases.

The full set of statements adds about 60K to the size of a database.

You can delete the stored prepared statements in a database created for these queries by executing the method dropAllJDBCMetaDataSPSes in the class COM.cloudscape.database.Database in an SQL-J statement. To create an instance of that class against which you can call the method, call getDatabaseOfConnection() in the class COM.cloudscape.database.Factory (aliased as Factory). For example:

CALL Factory.getDatabaseOfConnection().
    dropAllJDBCMetaDataSPSes()

The JDBC driver is responsible for the creation and retrieval of the JDBC metadata statements.

Possible Values (case-insensitive)

  • off

    The JDBC driver does not create any stored prepared statements.

  • dynamic (DEFAULT)

    The JDBC driver creates stored prepared statements on an as-needed basis. Each time a JDBC metadata request is made to the driver, it checks the SYS schema for the appropriate stored prepared statement. If the statement exists, it retrieves the statement and executes it. If the statement has not yet been created and stored, the driver creates the statement, stores it in the SYS schema, and then uses it.

  • onDatabaseCreation

    The JDBC driver creates all the metadata statements when Cloudscape creates a new database.

Default

Dynamic.

Example

cloudscape.jdbc.metadataStoredPreparedStatements=
    onDatabaseCreation

Scope

system-wide

NOTE: Without row locking, concurrency may be bad using the dynamic configuration.

Dynamic or Static

This property is dynamic; if you change it while Cloudscape is running, the change takes effect immediately. For information about dynamic changes to properties, see Dynamic or Static Changes to Properties.