SQL Server Articles


Categories : Performance | Audit | Business Intelligence | Clustering | Developer | Reporting | Windows Server | SQL Azure | Powershell | ASP.NET | Other .NET

Speeding UPDATEs Using the CASE Statement

Introduction One of the keys to SQL Server database performance if keeping your transactions as short as possible. In this article we will look at a couple of tricks using the CASE statement to perform multiple updates on a table in a single operation. By doing this, some transactions can be shorted, and performance boosted. […]

Save Space To Boost SQL Server Performance

It’s easy to become complacent about saving disk space when hard disk sizes keep growing and disk prices keep on dropping, but saving a few bytes here and there can help improve SQL Server’s performance considerably.If you have ever looked at an Execution Plan for a SQL Server query (and if you haven’t, you should!) […]

Upgrade to SQL Server 2000 SP1 for Improved Performance

All service packs includes numerous fixes to resolve various problems that Microsoft has found since the initial release of the product, and the recent release of SP1 for SQL Server 2000 is no different. What many people may not realize is that many of the fixes included with service packs affect performance. So not only […]

Speed Tips For SQL Server SELECT Statements

You can code a SQL SELECT statement in a number of ways to get the same results, but some versions of the same query may perform better than others. In this article we will look at ways to exploit this.Here is a query that I cut-and-pasted straight out of SQL 7 Books Online. The query […]

How to Search for Date and Time Values Using Microsoft SQL Server 2000

Suppose you’re writing a query to find all the invoices that were written on January 6, 2003. You know from the control totals that 122 invoices were written that day. But when you run this query: SELECT * FROM InvoicesWHERE InvoiceDate = ’2003-01-06′ the result set is empty. What’s going on? How Dates and Times […]

Use SET STATISTICS IO and SET STATISTICS TIME to Help Tune Your SQL Server Queries

This is not an article on how to tune queries (that subject would take a book), but an article on how to use the often overlooked Transact-SQL SET STATISTICS IO and the SET STATISTICS TIME commands to help us tune our queries.On the surface, the goal of performance tuning a query seems simple enough. Essentially, […]

How to Write SQL to Dynamically Script Mass INSERT Statement Scripts

The following is an article that describes a unique approach of scripting out the contents of a table. The reasons for doing so are many. The context that I will provide is one where you have a development environment where static tables exist for the purpose of storing application lookup data (i.e. a ZipCode table), […]

How to Fix the Problem When ADO Truncates Milliseconds from SQL Server Datetime Columns

If you create a SQL Server table that contains a datetime column and populate it with a GetDate() default then try to query it with ADO, you will discover that the data returned from datetime columns is returned without milliseconds. If you need milliseconds returned, this can be very annoying to deal with. For example, […]

Fun with Numbers in Transact-SQL Queries

Continues…

Speed Up SELECT DISTINCT Queries

Many people use the DISTINCT option in a SELECT statement to filter out duplicate results from a query’s output. Take this simple PUBS database query as an example:SELECT DISTINCTau_fname,au_lnameFROM authorsIn a simple SELECT from one table (like the one above) this is the easiest and quickest way of doing things.However, with a more complex query […]
Software Reviews | Book Reviews | FAQs | Tips | Articles | Performance Tuning | Audit | BI | Clustering | Developer | Reporting | DBA | ASP.NET Ado | Views tips | | Developer FAQs | Replication Tips | OS Tips | Misc Tips | Index Tuning Tips | Hints Tips | High Availability Tips | Hardware Tips | ETL Tips | Components Tips | Configuration Tips | App Dev Tips | OLAP Tips | Admin Tips | Software Reviews | Error | Clustering FAQs | Performance Tuning FAQs | DBA FAQs |