Hello,
In order to insert a lot of rows in a GLOBAL TEMPORARY table (ON COMMIT DELETE ROWS), I'm using batch update mode.
According to DBMonitor, I noticed that batch statements are sent only when I perform a COMMIT on the transaction (which is not compatible with ON COMMIT DELETE ROWS).
Is there a way to force de EF4 to send the batch updates orders immediatly ?
My goal is (in one transaction) to insert many rows in the GLOBAL TEMPORARY table and then use this table to perform a select on other tables WITH a join on this GLOBAL TEMPORARY table.
Right now, when I perform the select, it like the GLOBAL TEMPORARY table is empty.
Batch updates with GLOBAL TEMPORARY table
Batch Updates in Entity Framework is tightly tied to the local transaction.
There is no convenient solution at the moment. We can suggest you a workaround (only for single thread applications which use batch updates): if you know the number (N) of entities which you are going to insert into your database, set BatchSize=N:
The SQL will be generated on SaveChanges() and your entities will be sent to the database.
There is no convenient solution at the moment. We can suggest you a workaround (only for single thread applications which use batch updates): if you know the number (N) of entities which you are going to insert into your database, set BatchSize=N:
Code: Select all
var config = Devart.Data.Oracle.Entity.Configuration.OracleEntityProviderConfig.Instance;
config.DmlOptions.BatchUpdates.Enabled = true;
config.DmlOptions.BatchUpdates.BatchSize = N;
Batch Updates can be successfully used in a multi-threaded application. About Batch Updates: http://www.devart.com/blogs/dotconnect/ ... html#Batch.
There is "single thread" here because this is a case of inserting data into GLOBAL TEMPORARY tables.Shalex wrote:We can suggest you a workaround (only for single thread applications which use batch updates): ...