What if you know your OLTP searches should use the same execution plan for different binding values?
要是你知道你的OLTP搜索对不同绑定值应该使用相同执行计划又该怎么办呢?
The binding you choose depends on how you plan to access the component.
所选择的绑定取决于计划如何访问组件。
The reason for using binding parameters is to ask the database to parse your SQL once and reuse the generated execution plan for subsequent repeat requests, which saves both CPU time and memory.
使用绑定参数的原因是让数据库一次解析sql,对后续的重复请求复用生成好的执行计划,这样做节省了CPU时间和内存。
应用推荐