Two details about SQL Server

Source: Internet
Author: User

Some time ago, I saw some friends in the garden discussing the paging select problem of SQL Server. I felt that some friends may not be clear about some aspects of SQL Server (version 2000 or later, here, we will share some special processing methods provided by SQL Server after version 2000:

Top N sorting

The new Top N engine reduces the previous load of sort before Top N. when the data is read to the storage engine, the Top N records are filtered out first, then perform sort and other operations on these records. This design can improve the efficiency and shorten the query time in most cases.

Merry-go-round scans

In his book explaining performance tuning, Mr. Hu baijing translated it into a carousel scan.AlgorithmUsed to process repeated scans of the same data. For example, we have one page of data, and both users query them. If the data is scanned from the beginning of the page, assume that user B starts the scan operation when user a scans to 30%, when user a reaches 60%, user B completes 30%. This design may cause a severe vibration on the hard disk when scanning large data tables! The merry-go-round method is used. When user a scans to 30%, user B starts to scan from the current position of user A. When user a completes the entire operation, user B completes 70%, then scan the remaining 30% from the top, so that they read part of the data using the same query plan. This method reduces the number of back-and-forth reads from the system I/O when the same data is queried in an extreme time period, while enhancing the reading speed and unordered scanning, and no synchronization is required.

I still don't know whether Katmai has made any better improvements in these two aspects. I have never been able to install SQL Server 2008 successfully or try it. I will try again tomorrow when I prepare a VM, if you have experienced similar problems, please advise.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.