NHibernate provides two ways to perform batch updates and inserts:
AdoNetBatchSize: This property allows you to specify the number of SQL statements that will be executed in a batch before sending them to the database. By default, this property is set to 1, which means each SQL statement is executed individually. Increasing the AdoNetBatchSize can improve performance by reducing the number of round trips to the database.
Batch insert/update/delete: This feature allows NHibernate to group multiple inserts, updates or deletes for the same entity type into a single SQL statement. This can improve performance by reducing the number of overall SQL statements executed. To use batch insert/update/delete, you need to set the batch-size attribute on the entity mapping or on the session factory configuration.
Both of these strategies can be used together to further improve performance.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2023-05-28 16:03:21 +0000
Seen: 14 times
Last updated: May 28 '23
What is the method for programmatic access to a time series?
What is the procedure for using pg_restore on Windows with Docker?
Can SqlDependency be used in a programming language other than .NET, such as node js?
How can multiple queries be merged into a single stored procedure in MySQL?
How can I deal with Expression.Error related to a column in Power Query?
How can you implement pagination in Oracle for the LISTAGG() function?
What is the process for implementing a FutureBuilder on an OnTap function in Flutter?