I've implemented org.hibernate.StatelessSession into my application and inserts and updates are working beautifully, and fast. Deletes also work great except for one particular type of object. I'm using SQL Server 2005 and looking at the sql trace, I can see four delete statements executing when this object gets deleted, as expected. The delete statement running against this object's respective table is the one that takes the longest. This table is not large. The delete statement shows many reads in addition to the longest duration and most cpu. I've inspected the class, looking for anything out of the ordinary. No dice.
Any ideas for what to look into to determine the performance bottleneck on these particular deletes? Is this perhaps a case where hibernate is loading the object to delete it? I believe the stateless session doesn't do that.
Thanks!
|