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

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

Microsoft SQL Server 2008 R2 Unleashed- P124: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 | 1174 CHAPTER 34 Data Structures Indexes and Performance Listing 34.6 shows examples of running sys.dm_db_index_physical_stats on the sales_big table using both LIMITED and DETAILED scan modes. LISTING 34.6 sys.dm db index physical stats Examples use bigpubs20O8 go select str index_id 3 0 as indid left index_type_desc 20 as index_type_desc index_depth as idx_depth index_level as idx_level str avg_fragmentation_in_percent 5 2 as avg_frgmnt_pct str page_count 10 0 as pg_cnt FROM sys.dm_db_index_physical_stats db_id object_id sales_big null 0 LIMITED select str index_id 3 0 as indid left index_type_desc 20 as index_type_desc index_depth as idx_depth index_level as idx_level str avg_fragmentation_in_percent 5 2 as avg_frgmnt_pct str page_count 10 0 as pg_cnt FROM sys.dm_db_index_physical_stats db_id object_id sales_big null 0 DETAILED go indid index_type_desc idx_depth idx_ level avg_frgmnt_pct pg_cnt 1 CLUSTERED INDEX 0 63.42 14519 2 NONCLUSTERED INDEX 3 0 14.90 4571 indid index_type_desc idx_depth idx_ level avg_frgmnt_pct pg_cnt 1 clustered inoex 0 63.42 14519 1 CLUSTERED INDEX 3 1 92.11 38 1 CLUSTERED INDEX 3 2 0.00 1 2 NONCLUSTERED INDEX 3 0 14.90 4571 2 NONCLUSTERED INDEX 3 1 87.50 8 2 NONCLUSTERED INDEX 3 2 0.00 1 Again you can see from the output in Listing 34.6 that the logical fragmentation avg_frgmnt_pct is 63.42 for the leaf level of the clustered index idx_level 0 . This indicates that nearly two thirds of the data pages are out of sequence in relation to order Download from www.wowebook.com SQL Server Index Maintenance 1175 ing of the clustered key values. If you want to improve the performance of table scans or clustered index scans for the sales_big table you need to decide whether to rebuild the index or simply defragment the index. The degree of fragmentation helps you decide which defragmentation method to use. A rough guideline to use to help decide is to examine the avg_fragmentation_in_percent value returned by the sys.dm_db_index_physical_stats .

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.