3 Reasons to use SQL Server 2005

Source: Internet
Author: User
Tags add sql one table query

1: Use partitioned tables to improve database performance

Many of the previous processing of large amounts of data took the form of using multiple structured tables to be grouped by time, there are different data tables for data at different times, so if you want to query only one table's data quickly, if you need to cross table queries and then connect the tables to the table in a connection view, you can improve query efficiency , but at the expense of the elegance of programming and the simplicity of database design, especially when dealing with relationships, constraints, data integrity is very cumbersome and complex.

Upgrade to sql2005 can use the partition table (partition table) to handle this requirement, we can write our partitioning rules as partition functions, and then our partition table can follow this partition function to store our table on different storage media, when we query the SQL The server optimizer automatically selects partitions for joins, which is much more effective than a large number of filters.

2: Add a serial number to the query result set by Row_number

Query result set no serial number depressed problem believe toss a lot of people, often have customers pointing at my grid OR reported to me, "Mo, you can give this place add a serial number?" "For such a reasonable request can only be said to be, and then the results of the query to manually add a serial number, the performance of the sacrifice has to burn the Gaoshan blessing it can ascend to heaven, and then is to bless the customer inquires the amount of data not too big."

Upgrade to SQL2005 I can default the serial number this function to the user do not give me such a reasonable request.

3: The end of the cross-list nightmare

If you have done attendance management, choose to build 31 columns or add 31 lines? Select 31 columns intuitive, but when you query you may prefer to bump your head against the wall rather than to query, add 31 business when you decide to display the date in the column, you find that you still want to bang the wall. And when you're doing a student performance management system, you have to make a list of the class data in the student list, and you suddenly wake up and hit the wall better.

Upgrade to SQL Server2005 you can use pivot the word means "pivot" with axes you can twist rows into columns and twist columns (UNPIVOT)



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.