How/when mysql compiles stored procedures?

前端 未结 2 1446
时光说笑
时光说笑 2021-01-12 18:01

We intend to use mysql stored procedures for handling all database work for one project. There are several applications(different languages) using same database and I am fai

2条回答
  •  感动是毒
    2021-01-12 18:54

    MySQL will not compile all stored procedures at once. They will be executed on demand like queries as per requirement and when you call them.

    With a stored procedure, however, the database compiles the query plan once and reuses the compiled process. This pre-compilation can yield a significant performance advantage.

提交回复
热议问题