Oracle® TimesTen In-Memory Database SQL Reference Release 11.2.1 Part Number E13070-03 |
|
|
View PDF |
The UNLOAD CACHE GROUP statement deletes all rows from the cache group. The unload operation is local. It is not propagated across cache grid members.
Required privilege
No privilege is required for the cache group owner.
UNLOAD CACHE GROUP or UNLOAD ANY CACHE GROUP for another user's cache group
SQL syntax
UNLOAD CACHE GROUP [Owner.]GroupName [WHERE ConditionalExpression]
or
UNLOAD CACHE GROUP [Owner.]GroupName WITH ID (ColumnValueList);
Parameters
The UNLOAD CACHE GROUP has the parameters:
Parameter | Description |
---|---|
[ Owner .] GroupName |
Name assigned to the cache group. |
ConditionalExpression |
A search condition to qualify the target rows of the operation. |
WITH ID ColumnValueList |
The WITH ID clauses allows you to use primary key values to unload the cache instance. Specify ColumnValueList as either a list of literals or binding parameters to represent the primary key values. |
Description
This syntax causes the entire content of the cache group to be deleted from the data store.
If the cache group is replicated, an UNLOAD CACHE GROUP statement deletes the entire content of the cache group at replicas as well.
The UNLOAD CACHE GROUP statement can be used for any type of cache group. For a description of cache group types, see "User managed and system managed cache groups".
Use the UNLOAD CACHE GROUP statement carefully with cache groups that have the AUTOFRESH attribute. A row that is unloaded can reappear in the cache group as the result of an autorefresh operation if the row or its child rows are updated in Oracle.
Following the execution of a UNLOAD CACHE GROUP statement, the ODBC function SQLRowCount()
, the JDBC method getUpdateCount()
, and the OCI function OCIAttrGet()
with the OCI_ATTR_ROW_COUNT
argument return the number of cache instances that were unloaded.
Use the WITH ID clause to specify binding parameters
Restrictions
Do not use the WITH ID clause on readonly, autorefreshed user managed or autorefreshed and propagated user managed cache groups unless the cache group is a dynamic cache group.
Do not use the WITH ID clause with the COMMIT EVERY n ROWS clause.
Examples
CREATE CACHE GROUP recreation.cache FROM recreation.clubs ( clubname CHAR(15) NOT NULL, clubphone SMALLINT, activity CHAR(18), PRIMARY KEY(clubname)) WHERE (recreation.clubs.activity IS NOT NULL); UNLOAD CACHE GROUP recreation.cache;
See also