USER MANUALS

DROP_NONACTIVE_CACHE_TABLES

Description

This procedure drops cache tables that are no longer active (i.e., not referenced by any view with cache enabled).

It scans the cache data sources and identifies tables that exist in the cache database but are not associated with any active cached view. Optionally, it can run in preview mode to list the tables that would be dropped without actually dropping them.

Syntax

DROP_NONACTIVE_CACHE_TABLES(
    input_datasource_list : array of ( database_name : text, datasource_name : text )
    input_preview_mode : boolean
)
  • input_datasource_list (optional): list of pairs (database name, data source name) that identify the cache data sources to inspect. If not specified or empty, the procedure inspects all cache data sources configured in the Server.

  • input_preview_mode: if true, the procedure runs in preview mode and returns the list of tables that would be dropped, without actually dropping them. If false the tables are dropped.

It returns the following fields:

  • input_database

  • input_datasource

  • input_preview_mode

  • database_name

  • catalog_name

  • schema_name

  • table_name

  • processing_start_date_time

  • processing_end_date_time

  • processing_time

Each row represents a cache table that was dropped (or that would be dropped if running in preview mode), along with the data source it belongs to and the time taken to process it.

Privileges Required

Only global administrators can invoke this procedure.

Add feedback