Outdated Version

You are viewing an older version of this section. View current production version.

DROP ... FROM PLANCACHE

Forces a plan to be optimized and generated from scratch the next time it is run.

DROP [plan_id | DISTRIBUTED_JOINS] FROM PLANCACHE

Notes

  • plan_id - ID of the plan to invalidate. Find by running SHOW PLANCACHE.
  • DISTRIBUTED_JOINS - Drop all plans which run queries involving data movement operations. This is useful to force the optimizer to run again on all heavyweight queries after loading data into MemSQL.
  • This command will only drop plans running on the same node as it.
  • This command must be run on the master aggregator or a child aggregator node (see Node Requirements for MemSQL Commands).

Example

memsql> DROP 123 FROM PLANCACHE;
Query OK, 0 rows affected (0.00 sec)