官术网_书友最值得收藏!

Performance

Another reason to leverage parameters is performance. In a busy SQL Server system, particularly one that has a primarily Online Transaction Processing (OLTP) workload, we may have hundreds or even thousands of queries executing per second.

Assume that each one of these queries took about 100 ms to compile and consumed about the same amount of CPU. This would mean that each second on the system, the server could be consuming hundreds of seconds of CPU time just compiling queries. That's a lot of resources to consume in just preparing the queries for execution, and it doesn't leave a lot of overhead for actually executing them.

Also recall that when plans are not reused, the procedure cache can become very large and consume memory that in turn won't be available for storing data and executing queries. In short, a system that spends too much time compiling queries may become CPU- and/or memory-bound and may perform poorly.

主站蜘蛛池模板: 双城市| 关岭| 两当县| 内乡县| 札达县| 双城市| 清苑县| 安国市| 特克斯县| 双江| 永寿县| 油尖旺区| 视频| 黄大仙区| 象州县| 井冈山市| 平和县| 中阳县| 大姚县| 齐齐哈尔市| 盐山县| 梅州市| 深泽县| 叙永县| 灵丘县| 孟津县| 宁强县| 二连浩特市| 剑河县| 高雄县| 安国市| 调兵山市| 陕西省| 隆化县| 呼玛县| 济阳县| 衡东县| 昌宁县| 竹北市| 皋兰县| 错那县|