troubleshooting Question

How do I speed up writing to a MySQL database when using VB 2005

Avatar of shyanne
shyanne asked on
DatabasesVisual Basic ClassicVisual Basic.NET
12 Comments3 Solutions412 ViewsLast Modified:
I am writing very large files to a MySql database (5.0) through VB 2005 (using MySQL ODBC 3.51 driver) and the speed is very slow.  It is taking 20 to 25 minutes to write 51,000 records.  I have enclosed the code for the insert statement and the execute command.  Any help to speed this up would be greatly appreciated.

 


myCommand.CommandText = "Insert into cmix " _
      & "values('" & strDate & "', " & seq & ", " & endSeq _
      & ", '" & strWhse & "', " & batchNo & ", '" _
      & mailId & "', " & rank & ", '" _
      & sku & "', '" & desc _
       & "', " & qty & ", " & weight & ")" myCommand.ExecuteNonQuery()
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 3 Answers and 12 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 12 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros