Bug 806477

Summary: RFE: Review use of OrderBy annotations in the domain model
Product: [Other] RHQ Project Reporter: Jay Shaughnessy <jshaughn>
Component: DatabaseAssignee: Nobody <nobody>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4.3CC: hrupp
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 620933    

Description Jay Shaughnessy 2012-03-23 21:50:06 UTC
We have many instances of OrderBy annotation in our domain objects. And
most of then are defaulting to the ID field, typically just the sequence
value.

I'm not sure why we use these but in effect they cause in-memory
sorting by hibernate on the fetched data.  This of course slows things
down. A quick look shows that most are probably not a big deal given
low cardinality, but a few look interesting.  In general, if not needed
they just add confusion, along with a possibe perf hit.

One in particular to look at is Resource.childResources.

Comment 1 Mike Foley 2012-03-26 15:51:27 UTC
priority = medium, no target release, per BZ triage (crocuh, asantos, mfoley, loleary)

Comment 2 Charles Crouch 2012-03-27 02:37:26 UTC
Another in-memory issue similar to bug #620603