TAILIEUCHUNG - Microsoft SQL Server 2008 R2 Unleashed- P93

Microsoft SQL Server 2008 R2 Unleashed- P93: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 SQL Server 2008 is not as much of a quantum leap forward from SQL Server 2005 | 864 CHAPTER 27 Creating and Managing Views in SQL Server are searched. The same basic principles apply to indexes on views but indexed views are best utilized to increase performance in the following scenarios Aggregations such as SUM or AVG can be precomputed and stored in the index to minimize the potentially expensive computations during query execution. Large table joins can be persisted to eliminate the need to write a join when retrieving the data. A combination of aggregations and large table joins can be stored. The performance improvements from the aforementioned scenarios can be significant and can justify the use of an index. The Query Optimizer can use the precomputed results stored in the view s index and avoid the cost of aggregating or joining the underlying tables. Keep in mind that the Query Optimizer may still use the indexes found on the member tables of the view instead of the index on the view. The Query Optimizer uses the following conditions in determining whether the index on the view can be utilized The tables in the query FROM clause must be a superset of the tables in the indexed view s FROM clause. In other words the query must contain all the tables in the view. The query can contain additional tables not contained in the view. The join conditions in the query must be a superset of the view s join conditions. The aggregate columns in the query must be derivable from a subset of the aggregate columns in the view. All expressions in the query SELECT list must be derivable from the view SELECT list or from the tables not included in the view definition. All columns in the query search condition predicates that belong to tables in the view definition must appear in the GROUP BY list the SELECT list if there is no GROUP BY or the same or equivalent predicate in the view definition. NOTE Predicting the Query Optimizer s use of an indexed view can be complicated and depends on the complexity of the view that is indexed and the complexity of .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.