Dropping or Truncating Precomputed Result Sets

Dropping a precomputed result set deletes its data, removes any system table entries, and deletes the precomputed result set.

The syntax is:
drop {precomputed result set | materialized view}
	prs_name

You must be the owner of the precomputed result set to issue drop precomputed result set. See Reference Manual: Commands.

This example drops authors_prs:
 drop precomputed result set authors_prs
Next

Use the truncate command to truncate data in a precomputed result set. truncate retains the definition of the precomputed result set in the system table, ensuring that the precomputed result set can be later repopulated using the refresh command.

Truncating a precomputed result set moves it to a disabled state. SAP ASE moves the precomputed result set back to the enabled state when you issue refresh prs.

The syntax is:
truncate {precomputed result set | materialized view}
	prs_name
This example truncates the author_prs:
truncate precomputed result set authors_prs

SAP ASE implements the refresh command first as a truncate command and then recomputes the precomputed result set. In the unlikely event that the truncate command succeeds but the recompute fails, the precomputed result set is left disabled and you may reissue the refresh command.