Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » SQL Server   (RSS)

Paging SQL Server result sets

Paging through SQL Server result sets is an approach for reducing the network and client resources used to display large result sets. Here is a discussion of the merits of three approaches including their relative performance.

Favorite keyboard shortcuts

Here are a list of my favorite shortcuts in US Letter docx, A4 docx, US Letter XPS and A4 XPS formats. I have included Windows 7, Internet Explorer 8 and SQL Server Management Studio 2008 shortcuts.

SQL Server 2008 error handling best practice

Error handling in SQL Server 2008 needs careful implementation. Here is the pattern the Microsoft "Oslo" Repository uses. It is based on experimentation and best practice guidance from the SQL Server team and other SQL Server experts.

Testing strings for equality counting trailing spaces

The SQL standard requires that string comparisons, effectively, pad the shorter string with space characters. This leads to the surprising result that N'' ≠ N' ' (the empty string equals a string of one or more space characters) and more generally any string equals another string if they differ only by trailing spaces. Here is a discussion of various work arounds.

Instead of triggers over views (part 1)

Views are useful for creating a business entity based view data while allowing for an efficient logical schema. SQL Server’s instead of triggers allow many of these views to be updatable. Here are some experiments that show how to write them and some of their properties.

Large tuple uniqueness constraints in SQL Server

SQL Server 2008 limits unique constraints to 900 bytes of data per tuple. Here is a technique for enforcing uniqueness over larger tuple sizes.

SQL Server fragmentation

We have recently been looking at database fragmentation for real usage of the "Oslo" repository. However, since database fragmentation is a major cause of poor performance I thought a discussion of how to minimize and deal with database fragmentation in SQL Server might be generally useful.

Hierarchies (trees) in SQL Server 2005

There is much debate about how to implement hierarchies (trees) relationally in SQL Server. I decided to test the main techniques out and see which performed best for my application.

Adding intellisense and refactoring to the T-SQL editor

One of the features I would like to see in our tools for SQL Server is a T-SQL language service. This would give customers features like intellisense, text completion, refactoring (e.g. renaming a table everywhere at once), error highlighting (as in Word’s red squiggly underlining), and host of other features that C# and Visual Basic have in Visual Studio 2005. Unfortunately, implementing a language service for T-SQL requires solving some difficult problems.
 
Page view tracker