- Learn T-SQL Querying
- Pedro Lopes Pam Lahoud
- 170字
- 2021-06-24 14:38:12
Plan caching and reuse
As we have now established, the process of optimizing a query can consume a large quantity of resources and take a significant amount of time, so it makes sense to avoid that effort if possible whenever a query is executed. SQL Server caches nearly every plan that is created so that it can be reused when the same query is executed again. But not all execution plans are eligible for caching. For example, no DDL statements are cached, such as CREATE TABLE. As for DML statements, most simple forms that only have one possible execution plan are also not cached, such as INSERT INTO … VALUES.
There are several different methods for plan caching. The method we will use is typically based on how the query is called from the client. The different methods of plan caching that will be covered in this section are the following:
- Stored procedures
- Ad hoc plan caching
- Parameterization (Simple and Forced)
- The sp_executesql procedure
- Prepared statements
- PPT,要你好看
- 輕松學(xué)C語言
- ABB工業(yè)機器人編程全集
- Visual C# 2008開發(fā)技術(shù)詳解
- Spark大數(shù)據(jù)技術(shù)與應(yīng)用
- Docker High Performance(Second Edition)
- Storm應(yīng)用實踐:實時事務(wù)處理之策略
- Hadoop應(yīng)用開發(fā)基礎(chǔ)
- 過程控制系統(tǒng)
- 在實戰(zhàn)中成長:C++開發(fā)之路
- 手機游戲策劃設(shè)計
- 青少年VEX IQ機器人實訓(xùn)課程(初級)
- MPC5554/5553微處理器揭秘
- 計算機應(yīng)用基礎(chǔ)學(xué)習(xí)指導(dǎo)與練習(xí)(Windows XP+Office 2003)
- ARM嵌入式開發(fā)實例