LinqConnect Insert Taking 1 to 5 seconds per record
Posted: Tue 10 Dec 2013 22:40
We have a project in which we sometime need to insert up to 100 new records the insert time varies from 1 to 5 seconds per insert. I was reading through the help and see to enable batch updates I need to set UpdateCheck=UpdateCheck.Never and ensure The command does not return OUT parameters using the RETURNING clause, second query, or by LastInsertId (all updated object properties have AutoSync=AutoSync.Never parameter of the column attribute);
I am not sure how to ensure The command does not return OUT parameters. I see in the DBMonitor that the inserts all have a returning statement on them but am unsure how to suppress them.
We are using Oracle 11g and are currently on version: 4.4.374 of linqconnect.
Here is an example of the object we are inserting:
We are currently adding between 10 and 80 of these types of objects what can we do to improve the performance of these inserts?
Thanks,
Nick
I am not sure how to ensure The command does not return OUT parameters. I see in the DBMonitor that the inserts all have a returning statement on them but am unsure how to suppress them.
We are using Oracle 11g and are currently on version: 4.4.374 of linqconnect.
Here is an example of the object we are inserting:
Code: Select all
var udr = new NewDataRecord();
udr.COMP_ID = 24;
udr.GL_ACCT_UNIT_ID = 1234;
udr.COMPANY_NBR = 1111;
udr.OP_AREA_NBR = 1111;
udr.FAC_ID = 1111;
udr.YR_NBR = 2013;
udr.INV_DT = "12-NOV-2013;
udr.RTL_INV_TYP_ID = Convert.ToDecimal(3);
udr.RTL_INV_SUB_TYP_ID = 2;
udr.USR_DATA_RECORD_DATA_XML = "<row Attribute1='test' Attribute2='test2' Attribute3='test3' ID='THISID'/>";
udr.STAT_ID = 1;
udr.LAST_UPDATE_TS = DateTime.Now;
udr.MD_UPD_USR_ID = "TESTUSER";
udr.FEED_CD = "APAP";
udr.MD_LD_TS = DateTime.Now;
udr.MD_CRT_USR_ID = "TESTUSER";
udr.USR_DATA_FLD_TXT = "SOMEDATEHERE";
listofobjects.Add(udr);
DataContext.ENTITYNAME.InsertAllOnSubmit(listofobjects);
DataContext.SubmitChanges();
Thanks,
Nick