performance
Posted: Thu 02 Apr 2009 15:36
Hi @all
The following method needs about five minutes for 200 000 objects. If if just create an add the object and do not update the entities into the Oracle DB (entities.SaveChanges) it takes 4sec.
The Class Entities is created by the wizzard and contains the class PERSON.
public void TestEntities(string connectionString)
{
var entities = new Entities(connectionString);
long nextID = (from it in Loaded_entities.PERSON select it.ID).Max();
for (int j = 0; j <= 100000; j++, ++nextID)
{
var p = new PERSON
{
ID = (nextID),
NAME = "The Name"
};
entities.AddObject(typeof(PERSON).Name, p);
}
entities.SaveChanges(); //this needs soooooo long ;-((
}
What can i do to get a better performance?
thx and best wishes
martin
The following method needs about five minutes for 200 000 objects. If if just create an add the object and do not update the entities into the Oracle DB (entities.SaveChanges) it takes 4sec.
The Class Entities is created by the wizzard and contains the class PERSON.
public void TestEntities(string connectionString)
{
var entities = new Entities(connectionString);
long nextID = (from it in Loaded_entities.PERSON select it.ID).Max();
for (int j = 0; j <= 100000; j++, ++nextID)
{
var p = new PERSON
{
ID = (nextID),
NAME = "The Name"
};
entities.AddObject(typeof(PERSON).Name, p);
}
entities.SaveChanges(); //this needs soooooo long ;-((
}
What can i do to get a better performance?
thx and best wishes
martin