Runs a Tuple Mover operation on the specified table or projection and commits current transactions.


DO_TM_TASK('task'[, '[[database.]schema.]{ table | projection}]' )



Specifies one of the following tuple mover operations:

  • mergeout: Consolidates ROS containers and purges deleted records. For details, see Mergeout.
  • analyze_row_count: Collects a minimal set of statistics and aggregate row counts for the specified projections, and saves it in the database catalog. Collects the number of rows in the specified projection. If you specify a table name, DO_TM_TASK returns the row counts for all projections of that table. For details, see Analyzing Row Counts.
  • update_storage_catalog (recommended only for Eon Mode): Updates the catalog with metadata on bundled table data. For details, see Writing Bundle Metadata to the Catalog.

Specifies a schema, by default public. If schema is any schema other than public, you must supply the schema name. For example:


If you specify a database, it must be the current database.

table | projection

Applies task to the specified table or projection. If you specify a projection and it is not found, DO_TM_TASK looks for a table with that name and, if found, applies the task to it and all projections associated with it.

If you specify no table or projection, the task is applied to all database tables and their projections.


  • Schema: USAGE
  • Table: One of INSERT, UPDATE, or DELETE


Perform mergeout on all projections of table t1:

=> SELECT DO_TM_TASK('mergeout', 't1');