bad bug

2 views
Skip to first unread message

Max Ross

unread,
Jan 28, 2008, 11:26:32 PM1/28/08
to hibernate-...@googlegroups.com
http://forum.hibernate.org/viewtopic.php?p=2374359&sid=b337277456949beac58cfd3b419e5caa

Anybody see any flaws in this fellow's logic?  I think he's right.

Max

aviadl

unread,
Jan 29, 2008, 5:10:41 AM1/29/08
to Hibernate Shards Dev
He is defently right

there is an open bug on this issue from long time ago

see this line :
Correct support for AggregateProjection (max, min) so they will be
done in the database
from bug:
http://opensource.atlassian.com/projects/hibernate/browse/HSHARDS-47

On Jan 29, 6:26 am, "Max Ross" <max.r...@gmail.com> wrote:
> http://forum.hibernate.org/viewtopic.php?p=2374359&sid=b337277456949b...

Emmanuel Bernard

unread,
Jan 29, 2008, 9:27:17 AM1/29/08
to hibernate-...@googlegroups.com
Are you talking about applying the setMaxResult / setFirstResult on database?
There is a flaw, but I'm not sure we want to fix this flaw as the optimization is worthwhile.
When you order by nullable columns, some databases returns null columns first some do return null columns last. Applying an ordering on heterogenous shards could lead to an undefined behavior.
Aside from that, you can apply the max limit as firstResult + maxResult in DB without applying the firstResult, this will optimize DB accesses. You can then apply the firstResult in memory.

Max Ross

unread,
Feb 13, 2008, 3:49:26 PM2/13/08
to hibernate-...@googlegroups.com
http://fisheye.labs.jboss.com/changelog/Hibernate/?cs=14333

Fixing this uncovered all sorts of other excellent bugs.  Thanks everyone!
Reply all
Reply to author
Forward
0 new messages