B
Boris Nienke
Hello,
i've tried to use the SQL CE Database. But it seems to be very slow...
The Table (just for testing purposes):
ID1 int
Word1 NText
ID2 int
Word2 NText
No Index etc.
i have a Textfile with about 92,000 Lines.
Now i read the lines, split them and insert them into the table.
"Insert Into MyTable(ID1, Word1, ID2, Word2) Values (?,?,?,?)"
dbCom.Parameters.Add(new SqlCeParameter("ID1", SqlDbType.Int));
dbCom.Parameters.Add(new SqlCeParameter("Word1", SqlDbType.NText, 200));
dbCom.Parameters.Add(new SqlCeParameter("ID2", SqlDbType.Int));
dbCom.Parameters.Add(new SqlCeParameter("Word2", SqlDbType.NText, 200));
dbCom.Prepare();
then inside the loop i do:
dbCom.Parameters["ID1"].Value = iID1;
dbCom.Parameters["Word1"].Value = slZeile[0];
dbCom.Parameters["ID2"].Value = iID2;
dbCom.Parameters["Word2"].Value = slZeile[1];
i'm able to insert ~1700 Lines in a minute... this means i need nearly a
hour to complete this job.... TOO slow for me.
Any ideas?
Boris
i've tried to use the SQL CE Database. But it seems to be very slow...
The Table (just for testing purposes):
ID1 int
Word1 NText
ID2 int
Word2 NText
No Index etc.
i have a Textfile with about 92,000 Lines.
Now i read the lines, split them and insert them into the table.
"Insert Into MyTable(ID1, Word1, ID2, Word2) Values (?,?,?,?)"
dbCom.Parameters.Add(new SqlCeParameter("ID1", SqlDbType.Int));
dbCom.Parameters.Add(new SqlCeParameter("Word1", SqlDbType.NText, 200));
dbCom.Parameters.Add(new SqlCeParameter("ID2", SqlDbType.Int));
dbCom.Parameters.Add(new SqlCeParameter("Word2", SqlDbType.NText, 200));
dbCom.Prepare();
then inside the loop i do:
dbCom.Parameters["ID1"].Value = iID1;
dbCom.Parameters["Word1"].Value = slZeile[0];
dbCom.Parameters["ID2"].Value = iID2;
dbCom.Parameters["Word2"].Value = slZeile[1];
i'm able to insert ~1700 Lines in a minute... this means i need nearly a
hour to complete this job.... TOO slow for me.
Any ideas?
Boris