Hi. All.I am somewhat tired of SqlServer's performance of Insert. I have
lots of records want to insert into database, but as I insert them into
SqlServer, "insert into" sentence can get a hit of ~2000 record each time,
it is slow in my view.
As I try bcp, bcp can insert more than 10K records each time.
I heared couchdb for many times from erlang mailing list. Today I have my
test, it is a very simple program to insert records into couchDB.
Becaue one instance is slow, I running 10+ programs concurrent to insert
records into couchDB.
static void Main(string[] args)
{
DB mDB = new DB();
string sServer = "http://localhost:5984";
string sDb = "test";
string[] dbList = mDB.GetDatabases(sServer);
foreach (string db in dbList)
{
Console.WriteLine(db);
}
for(int i=0;i<10000000;i++){
Console.WriteLine("Processing " + i.ToString());
Person p = new Person();
p.name = "zhang" + i.ToString();
p.age = 12 + i;
string json = JsonMapper.ToJson(p);
mDB.CreateDocument(sServer, sDb, json);
}
}
But the performance is as bad as I can image, After several minutes run, I
only inserted into 120K records. I saw the speed is ~20 records each second.
When only 1 copy was running, seems higher, ~80. When I got 10 programs
running, the speed is very slow. After finally, couchDB crashed itself. :L.
Anyway, couchDB didn't impress me this time or impress me too much.
Is there any option?
I am using couchDB binary release on window2003.
Regards.
Scott Zhang