Hi guys,
This is the scenario:
I have an application based in Hibernate 3.3.1 + Spring 2.5.6 + SQL Server 2008 I have several tables which contain a blob like a property/column in the database.
Well, until now I did not realized because I did not have so many entries in the database. Now there is one of these tables which contain the blob like a property with 70000 entries and somehow sometimes we need to read almost of the entries at once for manipulating purpose.
When the read happened all these blobs for every entry are marked as "dirty" so next time I am doing anything with that table is updating all the entries that were retrieved before with the consequences of too much time and too many "updates" against the database. Really, I am not changing these blobs at all, just it seems like reading them is enough for hibernate to interpret that they must be updated later on.
Then I see 70000 calls to the database (MSSQL Monitor tool) like this:
Code:
update setPropertyWithBlob= ? where ID = ?;
That´s crazy.
I tried almost everything like deactivating caching, lazy-loads, ...
I will appreciate any help I can get !!
Thanks so much in advance