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

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

Importing databases in MS SQL

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

Why you should use MySQL

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

Finding slow MySQL queries

100% positive, 0 comments
– Tip added by dbdude on Jun 24, 2008 at 9:22 pm

Matching any character in a javascript regular expression

100% positive, 0 comments
– Tip added by an anonymous user on Aug 18, 2008 at 9:06 am

Submitting web forms without buttons

100% positive, 1 comment - last added on Aug 06, 2008 at 1:26 pm
– Tip added by an anonymous user on Aug 06, 2008 at 8:16 am

Random number generation

100% positive, 0 comments
– Tip added by an anonymous user on Aug 05, 2008 at 6:49 am

Optional parameters in javascript functions

100% positive, 0 comments
– Tip added by an anonymous user on Jul 30, 2008 at 10:44 am

Getting site contents on mobile devices

100% positive, 0 comments
– Tip added by an anonymous user on Jul 25, 2008 at 6:46 am

Detecting if a variable exists in Javascript

100% positive, 1 comment - last added 3 days, 15 hours ago
– Tip added by an anonymous user on Jul 22, 2008 at 8:31 am

Using optional parameter in javascript

Categories: javascript programming
100% positive, 0 comments
– Tip added by an anonymous user on Jul 17, 2008 at 7:49 am

Redirecting in PHP

100% positive, 0 comments
– Tip added by an anonymous user on Jul 17, 2008 at 7:27 am

Ternary operator in Pyton

100% positive, 0 comments
– Tip added by an anonymous user on Jul 11, 2008 at 9:36 pm

Javascript Error: unterminated regular expression literal

100% positive, 0 comments
– Tip added by marty on Jun 26, 2008 at 1:20 pm

attaching events to nodes in Javascript

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

Figuring out shortcuts in Eclipse

no ratings, 0 comments
– Tip added by an anonymous user on Aug 13, 2008 at 3:17 pm

animating elements with jQuery

no ratings, 0 comments
– Tip added by an anonymous user on Aug 04, 2008 at 1:46 pm

Windows Vista performance tips

no ratings, 0 comments
– Tip added by an anonymous user on Aug 04, 2008 at 1:26 pm

MySQL Decode Equivalent

Categories: MySQL Oracle databases
no ratings, 0 comments
– Tip added by an anonymous user on Jul 10, 2008 at 5:00 pm

1067 errors in Actionscript

no ratings, 0 comments
– Tip added by an anonymous user on Jun 17, 2008 at 9:28 pm

Referencing methods in PHP usort

Categories: php coding programming
no ratings, 0 comments
– Tip added by an anonymous user on Jun 13, 2008 at 11:18 am