Đang chuẩn bị liên kết để tải về tài liệu:
MASTERING SQL SERVER 2000- P11

Không đóng trình duyệt đến khi xuất hiện nút TẢI XUỐNG

Tham khảo tài liệu 'mastering sql server 2000- p11', công nghệ thông tin, cơ sở dữ liệu phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | 520 CHAPTER 14 STORED PROCEDURES 6. On the third screen check the Insert box next to the authors table. Click Next. 7. On the final screen click the Edit button. 8. On the Edit screen change the name of the stored procedure to Authors_Insert then click OK. UNDERSTANDING STORED PROCEDURES 521 9. On the final screen click Finish. Note that the Edit button will allow you to change the code used to create the stored procedure but you do not want to make any changes here. PART III Digging into SQL Server 522 CHAPTER 14 STORED PROCEDURES If you would like to see exactly what this stored procedure will do for you open it and look at its properties in Enterprise Manager. You will notice in Figure 14.1 that it is a simple stored procedure that uses input parameters to insert new records into the authors table. FIGURE 14.1 The Create Stored Procedure Wizard is designed to create quick simple stored procedures. Now that you know how to create and use stored procedures you need to know how to keep them running fast. Let s get a little more in depth on how they work and how to optimize them. Optimizing Stored Procedures To optimize a stored procedure it is best for you to understand a little more about how SQL Server executes queries. When SQL Server first executes a query any query not just stored procedures it compiles the query first. The compiling process is just SQL Server peering inside your query to see what you are trying to accomplish. Specifically SQL Server looks at what tables you are JOINing and what columns you have specified in the WHERE clause of your query. Once the server has this knowledge it can develop an execution plan which is a map of what indexes would return data fastest. Once the execution plan has been devised SQL Server stores it in procedure cache which is an area of RAM that has been specifically apportioned for this .

Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.