This is the documentation for Vitess v14.0, an older release. See the v24.0 documentation for the latest release.

VExec

Wrapper on VReplicationExec to run query on all participating primary tablets

This command was deprecated in v12.0 and has been removed in v16.0.

Command #

VExec  -- [--dry_run] <keyspace.workflow> <query>

Description #

VExec is a wrapper over VReplicationExec. Given a workflow it executes the provided query on all primary tablets in the target keyspace that participate in the workflow. Internally it calls VReplicationExec for running the query.

Parameters #

--dry-run #

optional
default false

You can do a dry run where no actual action is taken but the command logs the queries and the tablets on which the query would be run. by VExec.

keyspace.workflow #

mandatory

Name of target keyspace and the associated workflow

query #

mandatory

SQL query to be run: validations are done to ensure that queries can be run only against vreplication tables. A limited set of queries are allowed.

Example #

vtctlclient VExec keyspace1.workflow1 'select * from _vt.vreplication'