Re: writing to database slows down
Posted by: John Payne
Date: November 14, 2006 10:37AM

Unfortunately I have not done much benchmarking with .net with MySQL - confession, most of my experience is with MS SQL Server.. 150 recs in 5 secs does seem on the low side but is the network benchmark from the client or server ? is the server a dedicated database server, would tuning the server help ? How large a row is being written ? Use ISAM instead of InnoDB ?

If it is a issue with client expectations, 400,000 is a large number of records turn the process into an out of hours job ;-)


I am assuming you are using one of the .net data adaptors..

The only other thing I can think of is loading up a dataset with a large number of rows and use a data adaptor to write the whole lot in a chunk say 10,000 at a time. I am not sure if this will speed things up though.

:-

MySqlConnection myConn = new MySqlConnection(DataServices.conn);
MySqlDataAdapter myDataAdapter = new MySqlDataAdapter();

myDataAdapter.InsertCommand = new MySqlCommand("insertchemistrydetails",myConn);

myDataAdapter.InsertCommand.Parameters.Add("?pChemistryDetailsUUID" ,MySqlDbType.VarChar);
myDataAdapter.InsertCommand.CommandType= CommandType.StoredProcedure;
myConn.Open();

try
{
myDataAdapter.Update(ds,"chemistrydetails");

Options: ReplyQuote


Subject
Written By
Posted
November 09, 2006 08:41AM
November 09, 2006 08:47AM
November 10, 2006 02:06AM
November 14, 2006 02:06AM
Re: writing to database slows down
November 14, 2006 10:37AM
November 15, 2006 06:12AM


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.