Bug 99237

Summary: useFirstRowsByDefault is ignored
Product: [Retired] Red Hat Web Application Framework Reporter: Rafael H. Schloming <rafaels>
Component: persistenceAssignee: ccm-bugs-list
Status: CLOSED WONTFIX QA Contact: Jon Orris <jorris>
Severity: medium Docs Contact:
Priority: medium    
Version: nightlyCC: tross
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-09-28 21:27:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Rafael H. Schloming 2003-07-16 13:50:08 UTC
Currently the persistence initializer just throws away the value of the
useFirstRowsByDefault parameter.

Comment 1 Daniel Berrangé 2003-07-16 14:22:58 UTC
Are we really sure that the 'FIRST_ROWS' hint is a sensible thing to be doing at
all. From reading the Oracle documentation it seems that this is entirly the
*wrong* thing to be doing for most queries. One conceivable case where it may
help is if the query had 'setRange()' applied, but even then there are so many
other variables at work that blindly applying it to all queries doesn't seem
right. Aram tells me DP-WCMS got significant performance improvements removing
the FIRST_ROWS hint. We've had similar experiance with Oracle deployments here
in the UK, particularly with 9.0.1.

Comment 2 Rafael H. Schloming 2003-07-16 15:21:51 UTC
The useFirstRowsByDefault parameter has never applied to all queries, only to
those queries that use setRange(). The reasoning and evidence is presented in an
oracle performance book, unfortunately I don't recall the name, although Justin
might since I believe it was his book. I'd believe that the information in the
book is dated to particular versions of oracle, especially since oracle likes to
make significant changes to critical sections of their query optimizer between
minor point releases (hence the parameter that lets you disable it), but there
is solid evidence that the first rows hint is quite useful in the situations
where we apply it when the parameter is enabled. In fact given the name I
suspect we're using it exactly where it was intended to be used by oracle.