Web Wiz - Green Windows Web Hosting - Celebrating 25 Years!

  New Posts New Posts RSS Feed - SQL Server Speed Issue
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

SQL Server Speed Issue

 Post Reply Post Reply
Author
jmarkley View Drop Down
Newbie
Newbie


Joined: 09 August 2005
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote jmarkley Quote  Post ReplyReply Direct Link To This Post Topic: SQL Server Speed Issue
    Posted: 09 August 2005 at 5:16pm
Since migrating from Access to SQL Server, there seems to be a severe lag in response.  Is this an existing issue?  Are there any fixes?
Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post Posted: 09 August 2005 at 6:13pm
this can be because of a number of issues

- distance between servers
- on same server as web
- overloaded server

but also note, it takes a while for the indexs to be effective.
Back to Top
JJLatWebWiz View Drop Down
Groupie
Groupie
Avatar

Joined: 02 March 2005
Location: United States
Status: Offline
Points: 136
Post Options Post Options   Thanks (0) Thanks(0)   Quote JJLatWebWiz Quote  Post ReplyReply Direct Link To This Post Posted: 09 August 2005 at 9:12pm
I bet server lag is a fairly common problem for new users testing the WWF forum.  WWF for SQL uses a lot of Stored Procedures and has pretty good indexing which should make a very quick SQL server response, especially compared to Access.  The lag would be more pronounced on hosted solutions where the SQL server is on a remote shared SQL Server, as opposed to a SQL on the same machine as the IIS server or at least one in the same network subnet and where one SQL Server is dedicated to each IIS server.
 
Do hosts let clients run the MS SQL Query Analyzer in order gauge server responsiveness?
 
A few things are certain, on an active WWF forum, the SQL version will maintain more consistant performance with a much higher load.  Including loads that will break Access.  Also, having the MDB on the host machine is a security risk that is mitigated by SQL.
Back to Top
ricardohzsz View Drop Down
Newbie
Newbie


Joined: 05 August 2005
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote ricardohzsz Quote  Post ReplyReply Direct Link To This Post Posted: 17 August 2005 at 7:05pm
I've experimented the same problem. The problem was the persistent connection to the server "adoCon". I've deleted the adoCon variable and i'm using the connection string instead.
 
Old line:  rsCommon.Open strSQL, adoCon
New line: rsCommon.Open strSQL, strCon
 
I'm using the same machine for IIS and Sql Server. The perfomance are much better.
 
I've added this function to execute actions and sql sentences that don't return records
 
Public function ExecSp(byval strSQL)
 Dim cn
 
 set cn=createobject("ADODB.Connection")
 cn.Open strCon
 cn.execute strSQL, ,128
 set cn = nothing
End Function
 
Back to Top
JJLatWebWiz View Drop Down
Groupie
Groupie
Avatar

Joined: 02 March 2005
Location: United States
Status: Offline
Points: 136
Post Options Post Options   Thanks (0) Thanks(0)   Quote JJLatWebWiz Quote  Post ReplyReply Direct Link To This Post Posted: 22 August 2005 at 6:15pm
Thanks ricardohzsz, that is a fascinating recommendation.  I wonder if jmarkely got the message to try your suggestion.
 
In your experience, was the performance hit mostly a problem during the message body search also?  How large is your data set?
 
To implement this change on the search function, open the search.asp page and look for this text:
 
'Set the cursor type property of the record set to dynamic so we can naviagate through the record set
rsCommon.CursorType = 1
 
'Query the database
rsCommon.Open strSQLResultsQuery, adoCon
Then change adoCon to strCon.
 
I've done this change on a couple different pages running on MySQL and MS SQL and both seem to work fine.  It's very difficult for me to compare performance based on this change because my datasets just aren't large enough to see a problem yet.  I wonder if this is a flaw in the ADO connection pooling system?
 
Back to Top
ricardohzsz View Drop Down
Newbie
Newbie


Joined: 05 August 2005
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote ricardohzsz Quote  Post ReplyReply Direct Link To This Post Posted: 02 September 2005 at 4:22am

I'm an administrator of the forum http://www.mvp-access.com/foro

Our actual database is an 100+ Megabytes mdb. I've experimented this poor perfomance when using the 7.92 versión with the migrated database. But really, the speed issue is not related with database size.
 
The flaw is not the connection pooling. Really, the connection pooling is working very well. The problem is the persistent connection. At least in my machine.
 
I've used the sql server profiler to find what's happening. Every time that asp pages performs an action using the persistent connection adoCon, in the profiler trace appears "audit" entrys with a high delay.
 
I made many changes y the database design but no results: clustered indexes, redundant indexes, ...
 
I'm not an expert on sql server and iis, but i think that sql server test if the persistent connection is still valid when asp pages uses it. And this test is (by large) more expensive than opening a new connection thanks to connection pooling. This is my opinnion.
 
The problem is not related to the dataset size. The speed problem appears in a completely new forum. Try a new instalation with only 1 category, only 1 forum, a some messages in this forum.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.