Đang chuẩn bị liên kết để tải về tài liệu:
Microsoft SQL Server 2008 R2 Unleashed- P139

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Microsoft SQL Server 2008 R2 Unleashed- P139:SQL Server 2005 provided a number of significant new features and enhancements over what was available in SQL Server 2000. This is not too surprising considering there was a five-year gap between these major releases.Microsoft SQL Server 2008 is not as much of a quantum leap forward from SQL Server 2005 | 1324 CHAPTER 36 Query Analysis TIP Unlike the graphical execution plans SSMS does not provide a way to save the client statistics. Fortunately the statistics are displayed using a standard grid control. You can right-click the client statistics and choose Select All. Then you right-click and select Copy. You can then paste the information into a spreadsheet program such as Excel which allows you to save the information or perform further statistical analysis on it. Using the SET SHOWPLAN Options In addition to the graphical execution plans available in SSMS SQL Server 2008 provides three SET SHOWPLAN options to display the execution plan information in a text or XML format. These options are SET SHOWPLAN_TEXT SET SHOWPLAN_ALL and SET SHOWPLAN_XML. When one of these options is enabled SQL Server returns the execution plan generated for the query but no results are returned because the query is not executed. It s similar to the Display Estimated Execution Plan option in SSMS. You can turn on the textual execution plan output in a couple of ways. One way is to issue the SET SHOWPLAN_TEXT ON SET SHOWPLAN_ALL ON or SET SHOWPLAN_XML ON command directly in the SSMS query window. These commands must be executed in a separate batch by themselves before running a query. TIP Before enabling SHOWPLAN_TEXT or SHOWPLAN_ALL options in a Query Editor session in SSMS be sure to disable the Include Actual Execution Plan option otherwise the SHOWPLAN options will have no effect. SHOWPLAN_TEXT Typing the following command in an SSMS query window turns on the SHOWPLAN_TEXT option SET SHOWPLAN_TEXT ON GO Setting this option causes the textual showplan output to be displayed in the results panel but does not execute the query. You can also enable the SHOWPLAN_TEXT option by choosing the Query Options item from the Query menu. In the Query Options dialog you click the Advanced item and check the SET SHOWPLAN_TEXT option. The SHOWPLAN_TEXT option displays a textual representation of the .