SQL Server performance optimization split boost performance distributed view (vii)

Source: Internet
Author: User

Distributed view:

1. partition large tables onto multiple servers for storage

2. There are multiple tables physically and logically

3. Access to multiple server tables through view implementations

4. Consolidate Network Load Balancing

Link Two databases:

Create the same data structure:

CREATE TABLE sales (c1 int not NULL,C2 int) ALTER TABLE sales ADD constraint PK_SALES_C1 primary KEY (C1) ALTER TABLE sales Add constraint ck_sales_c1 Check (c1 between 1 and 100)
--Post Database 101---200

Click New Linked server:

To create a view:

CREATE VIEW V_sales as SELECT * FROM Sales UNION ALL SELECT * FROM [LOCALHOST\SRC1] HRDB.dbo.Sales

Establish a link to the first server on the second server and the same steps as above

Execute the following statement:

Insert V_sales VALUES (2,2) Insert V_sales values (200,200)

Error: (Ensure that distributed things are available)

Open:

Error at the time of execution:

Change to this:

Set XACT_ABORT on Insert V_sales values (2,2) Insert V_sales values (200,200)

Execute the following statement:

The results are as follows:

Execute the following UPDATE statement:

The first server is not all on the second server:

This shows: Distributed view can effectively solve the system performance problems, the large table different record range---on different servers, and then through the view of the table operation, effective balance server load traffic

Split up access to the boosted data:

Placement of data:

1. Principles of Data placement:

1. Create filegroups on different powerless disks or raid

2. Place tables in common connection queries to different filegroups

3. Place large, frequently accessed tables into different filegroups

4. log files are stored on separate disks

5. Place the tempdb database on a fast disk or raid

SQL Server performance optimization split boost performance distributed view (vii)

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.