Improve Oracle insert performance using EF Core

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
ricsmania
Posts: 9
Joined: Fri 17 Jun 2016 16:37

Improve Oracle insert performance using EF Core

Post by ricsmania » Tue 02 Aug 2016 14:25

I'm trying to insert many records into Oracle using EF Core but the performance is far from acceptable.

If I insert directly without EF Core I can insert around 150k rows/s.
By using EF Core I insert around 2k rows/s.

Does the EF Core driver support bulk inserts? If so, how do I do that?

I have tried using the BatchUpdates options but I don't know if it works with EF Core or how to use it.

If not, is there another solution to improve performance?

Thanks!

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Improve Oracle insert performance using EF Core

Post by Shalex » Thu 04 Aug 2016 11:33

We recommend to use direct path load (via OracleLoader class) to get the best performance.

ricsmania
Posts: 9
Joined: Fri 17 Jun 2016 16:37

Re: Improve Oracle insert performance using EF Core

Post by ricsmania » Mon 08 Aug 2016 13:59

I got much better performance by using direct path, like I said on the first post, but my question is if it is somehow possible to improve performance when using EF Core.

More specifically, are batch updates supported in EF Core. If so, how to use it? This page says the feature exists, but doesn't specify for which versions: https://www.devart.com/dotconnect/entityframework.html
Performance:
Batch Updates

Our providers support configurable batch updates, grouping several INSERT/UPDATE/DELETE statements into one SQL block, which increases SaveChanges() performance substantially, because of reducing number of server calls and producing more compact SQL code.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Improve Oracle insert performance using EF Core

Post by Shalex » Tue 09 Aug 2016 08:37

The Batch Updates feature is supported for EF1, EF4, EF5, EF6. We will notify you when the corresponding support is implemented for EF Core as well.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Improve Oracle insert performance using EF Core

Post by Shalex » Fri 09 Dec 2016 17:31

Batch Updates support in EF Core is added: viewtopic.php?f=1&t=34692.

Post Reply