Hi,
I'm using nhibernate and I'm trying to delete from a single query many rows in the database (around 3.000.000)
I'm using the next statement:
------------------------------------------------------------------------
Code:
tx = session.BeginTransaction();
session.Delete("from item c where c.ItemType= ?", type, NHibernateUtil.Int32);
tx.Commit();
------------------------------------------------------------------------
The idea is that is working OK. But looking in the RAM manager I see that it is increasing very very much. I guess that the idea behind this delete is loading the all objects in memory. There is another way to perform a simple delete such as from one shoot:
DELETE FROM items WHERE ItemType = 3;
Thx in advane and best regards....