DO_TM_TASK

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

Tip: Running this function does not require you to stop the tuple mover.

Syntax

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

 

Parameters

task

Specifies one of the following tuple mover operations:

  • moveout: Moves out data from WOS to ROS. For details, see Moveout in the Administrator's Guide.
  • mergeout: Consolidates ROS containers and purges deleted records. For details, see Mergeout in the Administrator's Guide.
  • analyze_row_count: 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.

    Vertica automatically analyzes all projection row counts at the time intervals specified by configuration parameter AnalyzeRowCountInterval.

    DO_TM_TASK aggregates row counts calculated during loads. It commits this data to the catalog when the percentage of WOS to ROS equals the setting in configuration parameter ARCCommitPercentage.

    analyze_row_count analyzes the row count of Vertica projections. To calculate row counts for external tables, use ANALYZE_EXTERNAL_ROW_COUNT.

schema

Specifies a schema. If multiple schemas are defined in the database, include the schema name. For example:

myschema.thisDbObject
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 no table or projection is specified, the task is applied to all tables and projections in the database.

Privileges

Examples

The following example performs a moveout of all projections for the t1 table:

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

The following example performs a moveout for the t1_projprojection :

 

=> SELECT DO_TM_TASK('moveout', 't1_proj');