MySQL Forums
Forum List  »  Performance

Slow mySQL Queries, high CPU Utilization
Posted by: reiner wein
Date: October 12, 2005 05:21AM

Hi,

I'm concerned about the speed of my mySQL-Server (5.0.6-beta-nt as InnoDB with MySQL Connector .NET 1.0.4), running on An Athlon XP 2,4GHz, 1GB RAM.

My application is coded in VB. NET.

I loop through an array with 50.000 entries.
For every entry, the app checks whether the entry of the array is in a database table (using a SELECT command).
If the entry exists, some other data from another table is added (using UPDATE) otherwise it will be inserted (INSERT).

This results in a few queries for every array entry which will be executed by the server one after another.

An example for a select query:
SQL = "SELECT bla from dbtComplete WHERE dings = ?dings"
myCommand.Connection = conn
myCommand.CommandText = SQL
myCommand.Parameters.Add("?dings", dings)
Try
myReader = myCommand.ExecuteReader()
Catch myerror As MySqlException
MsgBox("fehler: " & myerror.Message)
End Try
myCommand.Parameters.Clear()

It takes about 4 hours (!!) to run through the array, the CPU runs at 95 - 100% and the mySQL Admin shows "freeing items" most of the time ?

What's wrong here ?

Options: ReplyQuote


Subject
Views
Written By
Posted
Slow mySQL Queries, high CPU Utilization
1789
October 12, 2005 05:21AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.