|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hello,
I'm developing a database using MySQL(v 4.0.4 beta-max-nt) as my database server and a vb(VB6) application as the client. On my client application, I have developed a class module that performs all the SQL calls to MySQL. The database has 7 tables. One of my tables has about 15000 records. My problem is that when I execute a query to this specific table, it takes about 10 seconds to get the result. It is way too long and I have no idea of what is the problem. Does somebody can tell me what is wrong or what I'm doing wrong?? Here is what I have on my class module using ADO which makes the SQL call Private Sub Class_Initialize() Set cnCommercial = New ADODB.Connection cnCommercial.Provider = "MSDataShape" cnCommercial.ConnectionString= "DSN=myODBC;UID=*****;PWD=*******; " End Sub Private Sub Class_Terminate() Set cnCommercial = Nothing End Sub Public Function Get_Table_Recordset(strTable As String) As ADODB.Recordset cnCommercial.Open cnCommercial.CursorLocation = adUseClient strSQL = "SELECT * FROM " & strTable Set Get_Table_Recordset = cnCommercial.Execute(strSQL) Get_Table_Recordset.ActiveConnection = Nothing cnCommercial.Close End Function |
|
#2
|
||||
|
||||
|
have you tried this same command from the mysql command line?
You could also try and put an index on the table which would speed up retrieval also. |
![]() |
| Viewing: Dev Shed Forums > Other > Beginner Programming > Need help with MySQL and VB ! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|