Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Reducing Round Trips - Part 3


Reducing Round Trips - Part 3

Author
Message
Andy Warren
Andy Warren
SSCrazy Eights
SSCrazy Eights (9K reputation)SSCrazy Eights (9K reputation)SSCrazy Eights (9K reputation)SSCrazy Eights (9K reputation)SSCrazy Eights (9K reputation)SSCrazy Eights (9K reputation)SSCrazy Eights (9K reputation)SSCrazy Eights (9K reputation)

Group: Moderators
Points: 8986 Visits: 2721
Comments posted to this topic are about the content posted at http://www.sqlservercentral.com/columnists/awarren/reducingroundtripspart3.asp>http://www.sqlservercentral.com/columnists/awarren/reducingroundtripspart3.asp

Andy
SQLAndy - My Blog!
Connect with me on LinkedIn
Follow me on Twitter
johnhind
johnhind
Forum Newbie
Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: General Forum Members
Points: 5 Visits: 1
"ADO recordsets have a filter method, the only downside is that it only accepts one where clause."

...do you mean the "Find" method ? The "Filter" method can have many items in the Where clause.

John



Coach James
Coach James
SSC Journeyman
SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)

Group: General Forum Members
Points: 86 Visits: 47

Reducing Client/Server traffic

Session Variable Lists can be controlled as a just-in-time requirement, instead of loading them ALL at Login… We first were pulling in all of our required drop-down data as soon as a user logs in, and then would reuse these to repopulate (from session) as needed on all forms and pages.

Well we started this way and then needed a refresh process for when the drop-data gets changed by the current user. Example: A user needs to assign an employee to a new route/task (via drop-down) and also add new devices prior to assigning them as well (via drop-down).

Simple: The form which adds new devices (sets a refresh flag); an include file of all drop-down selections is invoked prior to the usage of all forms and the new session list is built. The user now has the new drop-down data and can continue in finishing the original assignment process.

Update: So now all the selection lists are being made at login and again as needed when the refresh flag is set.

The next step was to use JITS (just-in-time-selection) drop-down builds based on the form requirements as each page is called, instead of building them all at once (during logon). We created an include ASP procedure which we call with the form name prior to using the form each time it is used. This procedure builds all drop-down lists (only if not already built). This helps to eliminate the big wait just after logon, which was getting pretty obvious, and eliminated the extra work being done for forms (drop-down) requirements which were not even being used.

We researched our “logon history” table and found that most of our users were logging in to accomplish the following (as a one user session):

1. Multiple adds, updates, deletes within the same form types, same logon.

2. Most of the previous data changes were followed by queries on same data.

NOTE: Our inserts are data entry type forms, so the user can repeatedly enter new records as quickly as they can type and hit enter. So within the first call to a form, we load the required session drop-downs (this form only), and then reuse them as needed.

Our review also showed that each logon would concentrate on only a small percentage of our total forms at each logon session. Meaning they would logon again and again throughout the day for doing very different and selected processes.

Our savings in session variables and SQL requests has become quite noticeable!




Regards,

Coach James
Andy Grobecker
Andy Grobecker
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 4
I am wondering about the statements regarding nocount. I agree that it should be set on (not only for performance but because of problems with MS data access technologies throughout their history), but a quick check of the statistics in Query Analyzer report back a single round trip for a stored proc doing a number of updates regardless of the nocount setting (though a bunch more traffic + packets received for the stored proc executed when nocount is off)..



Andy Warren
Andy Warren
SSCrazy Eights
SSCrazy Eights (9K reputation)SSCrazy Eights (9K reputation)SSCrazy Eights (9K reputation)SSCrazy Eights (9K reputation)SSCrazy Eights (9K reputation)SSCrazy Eights (9K reputation)SSCrazy Eights (9K reputation)SSCrazy Eights (9K reputation)

Group: Moderators
Points: 8986 Visits: 2721
Fair point - I'll see if I can find time to do a network capture to be sure of what is really going on. QA is probably right, but I like to see live to be sure!

Andy
SQLAndy - My Blog!
Connect with me on LinkedIn
Follow me on Twitter
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search