RUN_INDEX_TOOL
Runs the Index tool on a Vertica database to perform one of these tasks:
-
Run a per-block cyclic redundancy check (CRC) on data storage to verify data integrity.
-
Check that the sort order in ROS containers is correct.
The function writes summary information about its operation to standard output; detailed information on results is logged in vertica.log
on the current node. For more about evaluating tool output, see:
You can also run the Index tool on a database that is down, from the Linux command line. For details, see CRC and sort order check.
Caution
Use this function only under guidance from Vertica Support.This is a meta-function. You must call meta-functions in a top-level SELECT statement.
Behavior type
VolatileSyntax
RUN_INDEX_TOOL ( 'taskType', global, '[projFilter]' [, numThreads ] );
Parameters
taskType
- Specifies the operation to run, one of the following:
-
checkcrc
: Run a cyclic redundancy check (CRC) on each block of existing data storage to check the data integrity of ROS data blocks. -
checksort
: Evaluate each ROS row to determine whether it is sorted correctly. If ROS data is not sorted correctly in the projection's order, query results that rely on sorted data will be incorrect.
-
global
- Boolean, specifies whether to run the specified task on all nodes (true), or the current one (false).
projFilter
- Specifies the scope of the operation:
-
Empty string (
''
): Run the check on all projections. -
A string that specifies one or more projections as follows:
-
projection-name
: Run the check on this projection -
projection-prefix
*
: Run the check on all projections that begin with the stringprojection-prefix
.
-
-
numThreads
- An unsigned (positive) or signed (negative) integer that specifies the number of threads used to run this operation:
-
n
: Number of threads, ≥ 1 -
-
n
: Negative integer, denotes a fraction of all CPU cores as follows:num-cores / n
Thus,
-1
specifies all cores,-2
, half the cores,-3
, a third of all cores, and so on.Default: 1
-
Privileges
Superuser
Optimizing performance
You can optimize meta-function performance by setting two parameters:
-
projFilter
: Narrows the scope of the operation to one or more projections. -
numThreads
: Specifies the number of threads used to execute the function.