Tip

Try using distributed views

SQL Server 2000 added a feature called the distributed view, that lets you segment a view horizontally across several physical SQL servers. When you perform such a segmentation of a view, you are breaking up a subset of the records from the complete view and placing it on server 1, placing a second set of records on server 2, and so on. This lets you achieve better performance, particularly in views that contain an extremely large number of records.

When you horizontally partition a view you use the CHECK CONTRAINTS command to limit the value that a column can hold. Once the view has been partitioned, you can create a view that links all of the servers together so that to a user it appears as if a single table is being browsed. The CHECK CONSTRAINTS command has a second impact on a distributed view. If you enforce a restriction on the view and that restriction excludes the records on some of your servers, the CHECK CONTSTAINTS command is used to eliminate those servers from the query, which can dramatically improve system performance.

Distributed views are particularly valuable in large corporate databases, and large data-driven Web sites. But here's the biggest plus: As your site continues to grow you can scale your SQL Server database by simply adding more servers to your distributed view.


Requires Free Membership to View

Barrie Sosinsky is president of consulting company Sosinsky and Associates (Medfield MA). He has written extensively on a variety of computer topics. His company specializes in custom software (database and Web related), training and technical documentation.


This was first published in November 2002

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.