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.

Syntax

DROP [plan_id | ALL] FROM PLANCACHE

Remarks

  • plan_id - ID of the plan to invalidate. Find by running SHOW PLANCACHE.
  • ALL - Drop all plans currently in memory, from both the memory and disk plan caches. Note that plans on disk but not in memory are unaffected.
  • This command will only drop plans running on the same node as it.

Example

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