Tip Details Add a Related Tip

Rate as: Positive Negative

Minimize round trips to the server for best performance

The biggest cause of poor performance in systems accessing SQL Server is poor application design. The biggest design error, the one I encounter more than any other, is to make too many round trips to the server.

I have just looked at a poorly performing application for a client. The application enabled a customer to be searched for by surname, and the list of matching customers were displayed to the user.

This should have been just one call to a stored procedure or SELECT statement, returning all columns in one hit. What the application actually did was a simple search on surname followed by one additional query for each matching customer.

What should have been one query taking a fraction of a second was actually 95 separate queries taking over a second in total.

In addition to the negative impact for the user, these extra round trips also increase load on CPUs and network.

So remember, if you are currently designing or coding an application with a SQL Server database, keep individual queries to a minimum, or performance and scalability will suffer.
Link: www.sql-server-pro.com...Search for more tips related to this link
Rating: 100% positive, 1 Vote
Categories: MS SQL databases optimization programming performance
Added: on Jun 18, 2008 at 4:07 pm
Added By: an anonymous user
Searches: performance sql server database application

Comments on this Tip

Add a Comment
There are no comments for this tip
Your Comment:
(how to format)
Rate This Tip:

Verify Humanity:
Sorry, we know it's annoying, but please enter the characters shown in the image to the left so that we know you're an actual person and not an evil spammer. Thanks.
       

Related Tips

Optimize your MySQL database

100% positive, 0 comments
– Tip added by an anonymous user on Dec 07, 2008 at 5:04 pm

Importing databases in MS SQL

100% positive, 0 comments
– Tip added by an anonymous user on May 29, 2008 at 2:47 pm

Optimizing your MySQL tables

no ratings, 0 comments
– Tip added by an anonymous user on Oct 21, 2008 at 11:18 am

Why you should use MySQL

no ratings, 0 comments
– Tip added by an anonymous user on May 30, 2007 at 10:02 am

jQuery ajax responseText empty

100% positive, 2 comments - last added on Aug 25, 2009 at 9:58 am
– Tip added by an anonymous user on Mar 27, 2009 at 8:26 am

reading select element values in javascript in IE7

100% positive, 0 comments
– Tip added by an anonymous user on Jul 17, 2009 at 1:28 pm

Unable to click in text input boxes on Internet Explorer

100% positive, 2 comments - last added on Aug 07, 2009 at 4:57 pm
– Tip added by Marcos84 on Dec 09, 2008 at 10:49 am

How to reduce load time for your blog or website - BlogPandit

50% positive, 0 comments
– Tip added by an anonymous user on May 24, 2009 at 2:01 am

Getting answers from Experts Exchange

Categories: programming web
100% positive, 0 comments
– Tip added by an anonymous user on Apr 14, 2009 at 10:57 am

CSS3 Color Names

100% positive, 0 comments
– Tip added by codenique.com on Apr 14, 2009 at 4:18 am

Don't include a "length" attribute in a JSON Object

100% positive, 0 comments
– Tip added by an anonymous user on Apr 10, 2009 at 4:51 pm

Speed up iPhoto load time

Categories: iPhoto speed databases
50% positive, 0 comments
– Tip added by an anonymous user on Mar 02, 2009 at 4:03 pm

Unable to make a Clean build in XCode

Categories: Mac Xcode programming
50% positive, 1 comment - last added on Jul 04, 2009 at 2:06 pm
– Tip added by an anonymous user on Feb 21, 2009 at 10:34 am

Checking for undefined variables in Javascript

100% positive, 1 comment - last added on Jul 14, 2009 at 5:13 pm
– Tip added by an anonymous user on Jan 14, 2009 at 9:47 am

Make and Print Clip-art Card for Thanksgiving 2009

no ratings, 0 comments
– Tip added by an anonymous user on Nov 09, 2009 at 8:25 pm

PHP strftime errors in Smarty

no ratings, 0 comments
– Tip added by an anonymous user on Nov 03, 2009 at 3:04 pm

Speed up Aero effects in Windows 7

no ratings, 0 comments
– Tip added by an anonymous user on Jul 27, 2009 at 8:18 am

How to develop extensions for Chrome

no ratings, 0 comments
– Tip added by an anonymous user on Mar 20, 2009 at 6:58 am

Improve Vista network performance

no ratings, 0 comments
– Tip added by an anonymous user on Dec 08, 2008 at 11:32 am

Oracle decode error

Categories: Oracle databases errors
no ratings, 0 comments
– Tip added by an anonymous user on Dec 01, 2008 at 10:08 am