MySQL Forums
Forum List  »  Stored Procedures

When does Stored Procedure execution plan get determined?
Posted by: Robert Rothkopf
Date: November 10, 2024 01:39AM

In SQL Server, Stored Procedure (SP) execution plans are saved at compile time and used whenever the SP is invoked, even if SP parameters in subsequent calls would make a different execution plan more efficient. Using WITH RECOMPILE forces new plans to be considered with each call.

Per MySQL docs, there is no equivalent "with recompile".

So my question is: "does MySQL reevaluate the execution plans within an SP each time it is called, or are they saved when the SP is first loaded (or first called) and always used regardless of new and changing parameters?"

I've searched the docs, Web and forum and can't find info on this.

Options: ReplyQuote


Subject
Views
Written By
Posted
When does Stored Procedure execution plan get determined?
126
November 10, 2024 01:39AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.