Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP > ADO > MyODBC > IIS and MySQL Speed Problems

Status
Not open for further replies.

BrendanK

Programmer
Jun 24, 2001
11
NZ
Hi All,

I was kinda hoping someone could help me out with a small problem I've been having... We host a site for clients which is backed by a MySQL database (a pretty small one at that).

I'm getting up to 6 second delays on each page with database code (every other page is fast), as if it's going through a lengthy connection process each time the database is called on. I would have thought IIS or myODBC would have held a connection open for a while.

I've written the site in ASP
- using ADO objects to retrieve my data
- serving the pages with IIS 4.
- Using myODBC to between ADO and MySQL

An example of my code follows:

****************************************************
set rsClient = Server.CreateObject("ADODB.RECORDSET")
With rsClient
.ActiveConnection = "Driver= {MySQL}" & _
";Server=10.10.10.251;" & _
"Port=3306;" & _
"Option=131072;" & _
"Stmt=;" & _
"Database=VReports;" & _
"Uid=root;" & _
"Pwd=elvis;"

.Open SQLStr ,, 0, 1
****************************************************

If seeing the site will help, let me know and I'll pass on the address.

Any help much appreciated.

Thanks!

Brendan.
 
If you access the MySQL database with Access via MyODBC, do you have the same delay?
 
Nope - the problem seems to be with IIS, ODBC or possibly with my coding???
 
I would try doing the code in baby steps. Try just connecting to the DB with no query. If that isnt slow, then try a sime query (maybe just a show tables). If that isnt slow then try a slightly more complex query. etc. etc.

Also watch your system resources on the server when you access that script/page from a differnt computers' browser to see if there might be a software problem.
 
Awesome... Will try.
Thanks for your help dude.

Brendan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top