This is a mirror of official site: http://jasper-net.blogspot.com/

Speeding up database access

| Monday, December 19, 2011
Part 1 Missing indexes

This is part 1 of an 8 part series of articles about speeding up access to a SQL Server database.  This series is based on chapter 8 "Speeding up Database Access" of my book  ASP.NET Site Performance Secrets, available at amazon.com and other book sites.

In parts 1 and 2 we'll see how to pinpoint any bottlenecks, such as missing indexes, expensive queries, locking issues, etc. This allows you to prioritize the biggest bottlenecks. Parts 3 through 8 than show how to fix those bottlenecks:


If you like this article, please vote for it.


Missing Indexes and Expensive Queries

You can greatly improve the performance of your queries by reducing the number of reads executed by those queries. The more reads you execute, the more you potentially stress the disk, CPU and memory. Secondly, a query reading a resource normally blocks another query from updating that resource. If the updating query has to wait while holding locks itself, it may then delay a chain of other queries. Finally, unless the entire database fits in memory, each time data is read from disk, other data is evicted from memory. If that data is needed later, it then needs to be read back from the disk. again

The most effective way to reduce the number of reads is to create enough indexes on your tables. Just as an index in a book, a SQL Server index allows a query to go straight to the table row(s) it needs, rather than having to scan the entire table. Indexes are not a cure all though - they do incur overhead and slow down updates - so they need to be used wisely.

Read more: Codeproject
QR: speedingupdatabaseaccess1.aspx

Posted via email from Jasper-net

0 comments: