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!

MySQL ODBC Driver 3.51

Status
Not open for further replies.

danmat46

Programmer
Nov 13, 2007
23
GB
Hello All!
Need a little help, I am new to MySQL ODBC when using vbScript and I have come across a problem that the connection appears to be ok but when running select queries they are taking each over 5 seconds to complete.

The table it is selecting on contains 64 rows.

here is an example piece of code:

strSQL = SELECT DISTINCT id from table where id = 10
set conn = CreateObject("ADODB.Connection")
conn.Open "Driver={MySQL ODBC 3.51 Driver}; Server=as3;Database=name","user","password"
set rs = conn.execute(strSQL)
'next line of code'

It takes 5 seconds plus to get the the next line of code from "set rs = conn.exec......."

Any ideas?

Latest driver 3.51.21 installed!

Thank you!

Dan
 
Ok let me develop this further:

Has anyone had any preformance issues with Apache Http server and MySQL?

Are there any settings / configurations I need to update?
 
The connection handling seems good to me. I can't see anything unusual, except for your query.

Code:
SELECT DISTINCT id from table where id = 10

If you want to know if a record with id 10 exists, you could drop the DISTINCT clause. If there is no uniqueness constraint on id (like a primary key constraint), you could add "LIMIT 1" at the end of the query.

But this should not make a difference of 5 seconds. Is there a slow network connection to the database server?
 
Thank you for the query suggestion. The query detailed above is a cut down version of the one being used and they both take 5 seconds to complete!

The network connection should not be an issue at all as this is sitting on a server with nothing really else installed or used.

It appears I may not the only one experiencing these issues now:
Many thanks for the support so far.
 
I have been looking at this further again today and noticed that my Apache error log is presenting this error:

Error in my_thread_global_end(): 2 threads didn't exit

Searched google on this and all solutions relate to PHP. I don't use PHP this is being caused by VBScript, so this maybe linked to the speed issue and the reason why the WScript.exe is failing to close promptly. MAYBE?

Any Ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top