batch-size is good enough for me.
Simon Spero wrote:
I've been kicking this idea around for a bit:
If you have a persistent class which has a numeric identifier type whose values are allocated sequentially, and if you often access instances of the class in a similar order to the order in which you create them, you can get a pretty good hit rate by treating part of the identifier as a page identifier, and fetching the entire page in a single request. ( e.g SELECT id,blah from table where id >= 1024 and id <= 2048)
This differs from the BatchingEntityLoader, in that these objects are being fetched without an explicit request. I can see this as having a couple of a negative consequences: firstly, there may be a loss of concurrency due to the whole page of objects being locked; secondly, if these objects are added to the session cache, they will slow down operations like flush even if they are never actually used.
I think the second problem can be avoided by putting the potentially unwanted objects into the second level cache, without adding them to the session cache. If a modified Loader were to creates an uninitialized entry in the session cache whilst building the object, then remove that reference once the objects was created, would that be safe? Or would it be better just to keep any extra rows dehydrated until they're needed?
At the moment I think the only place where this can be done is in the Loader, but I keep getting the feeling this kind of functionality belongs at a higher level (e.g. LoadEventListener?). Any comments/suggestions?
Thanks
Simon
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel