MySQL性能:原始查询和存储过程

时间:2023-01-19 16:35:54

As I know there is know significant performance difference between raw queries and stored procedures in MSSQL (for example, query plans are cached in the same way for both). But what about MySQL?

正如我所知道的,在MSSQL中,原始查询和存储过程之间存在显著的性能差异(例如,查询计划都以相同的方式缓存)。但是MySQL呢?

1 个解决方案

#1


4  

First, the value in SP is not in performance, hasn't been for some time. The value in stored procedures has more to do with security and data lifespan. Take a look at the article linked here a couple of years ago - Is this a valid benefit of using embedded SQL over stored procedures?

首先,SP中的值并不在性能上,已经有一段时间了。存储过程中的值与安全性和数据使用寿命有关。看看几年前链接在这里的文章——这是在存储过程中使用嵌入式SQL的有效好处吗?

#1


4  

First, the value in SP is not in performance, hasn't been for some time. The value in stored procedures has more to do with security and data lifespan. Take a look at the article linked here a couple of years ago - Is this a valid benefit of using embedded SQL over stored procedures?

首先,SP中的值并不在性能上,已经有一段时间了。存储过程中的值与安全性和数据使用寿命有关。看看几年前链接在这里的文章——这是在存储过程中使用嵌入式SQL的有效好处吗?