Jeff,

The native API handles transactions, see for 
example 
http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlbulkcopy(v=vs.110).aspx.
 
I'm talking of using NH as merely a wrapper over native APIs. If a driver 
cannot use the functionality, it would just throw an exception, like with 
multiqueries and futures. The advantages are huge performance gains when 
inserting large volumes of data, something that right now is not 
recommended with NH.
Anyway, I'll submit a pull request and I leave it to the community to 
decide its usefulness.

RP

On Tuesday, August 26, 2014 12:06:36 PM UTC+1, Jeffrey Becker wrote:
>
> Not that I object to the feature but when I've tried to insert "too many 
> rows" with NHibernate, my performance problems were distinctly 
> application-layer.  Stuff grinds to a halt in NHibernate well before you 
> can get to the volume of data where you could have a measurable difference 
> with inserts, at least on MsSqlServer.  Also how do these operations deal 
> with transactions?
>
> On Monday, August 25, 2014 10:10:23 AM UTC-4, Ricardo Peres wrote:
>>
>> Hi,
>>
>> I created an issue for a new feature. This would allow NHibernate to 
>> perform bulk inserts, where the database providers support it.
>> Currently, SQL Server has SqlBulkCopy, Oracle OracleBulkCopy and MySQL 
>> has MySqlBulkLoaders, other may have similar APIs. The idea is to leverage 
>> these APIs to allow high-performance inserts.
>> Before you say "NHibernate is not an ETL tool", I know! :-) Nevertheless, 
>> I think such a functionality is useful - I have needed it in the past.
>> I have some code, which I'm in the process of cleaning up, and I will 
>> submit a pull request. Maybe version 5 can take it, what do you think?
>>
>> RP
>>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"nhibernate-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nhibernate-development+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to