c# - Database or flat file for 600K records? -


I am writing a C # application that requires records of 600 records in a database at a certain point .

These are very easy records: just 3 tall ones.

I am using the parameter to set the command, and then insert the loop through the data in the memory to insert, the value in the command parameter and the running command on each loop. Except nonclline ()

The SqlServer takes approximately 50 seconds to finish, and it is only slow on MySQL when only a few milliseconds on the same file is inserted.

Am I doing something wrong or is the database just too slow?

You have to type more speed in a flat file for some reasons:

    < Li> ExecuteNonQuery does not group multiple insertion statements in the batch, so you send the complete difference per record to your inserting statements in the communication processing turnaround group.
  • You already have a successful file size, so you can stop writing it or write it with a few buffers.
  • The database operation uses trees which take N log n time, while creating a simple array size will take linear time. On the other hand, if you're merging in a sorted flat file, it will take a while.

Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -