You are viewing an older version of this section. View current production version.
Kill the connection on the specified thread. Rolls back any query running on the thread.
KILL [CONNECTION | QUERY] thread_id
thread_id- ID of the thread to kill. Find by running
KILL CONNECTIONWill disconnect the client associated with
thread_id. This is the default.
KILL QUERYWill not disconnect the client associated with
thread_id. Instead, the client will receive an error.
- Any query running on the connection will be rolled back.
- MemSQL checks for the kill bit during any potentially long running loop during query execution and rolls back the query’s transaction if the kill bit is set.
- This command must be run on the same node as the query to be killed.
- This command must be run on the master aggregator or a child aggregator node (see Node Requirements for MemSQL Commands).
memsql> KILL CONNECTION 3123; Query OK, 0 rows affected (0.00 sec)