db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Monroe" <Greg.Mon...@DukeCE.com>
Subject RE: LargeSelect and databases which do not support native limit/offset
Date Mon, 12 Sep 2005 14:57:05 GMT

> -----Original Message-----
> From: Thomas Vandahl 
> Scott Eade wrote:
> > My only comment would be that as a heavy user of LargeSelect, if I 
> > were to ever switch to a database that did not support limit and 
> > offset I could not easily produce an executing (though obviously 
> > poorly performing when it comes to LargeSelect) version of my 
> > application.

The issue was entered because LargeSelect DOES NOT WORK correctly with
DB's that do not support native limits.  In my case, it was MS SQL 
which says there are many more pages of data than there are and ends up
returning duplicate data. This is not simply a performance issue.

Ideally, this should be fixed to work for any DB.  However, in the
documenting the cases it doesn't work is the minimum.  Logging a message

IMHO, if this error is just logged, this may lead to "emergency fix" 
situations where users are screaming for a quick fix.  For example, you 
switch databases and do a QA run thru to verify it works.  You miss the
that the data returned is not accurate (it looks right, must be right).
users notice the problem and start complaining...

Throwing a runtime exception will clearly point out that you have
to fix in the QA phase.  It's always better to fix things before users

FWIW - I did do some research and found the following way to get MS SQL
do psuedo-limit queries:  


If my work load ever gets back to normal (major first release time), I
plan to 
see if it can be used to get LargeSelect to work with MS SQL.  But as
Thomas F
has said... this is a relatively complex class to work with.

While we're on the subject, shouldn't LargeSelect eventually be
refactored so 
that DB specific stuff LIMIT query handing resided in in the adaptor
area and 
not hidden inside the class?  Just a V4.5 TODO: tag...

Duke CE Privacy Statement
Please be advised that this e-mail and any files transmitted with it are confidential communication
or may otherwise be privileged or confidential and are intended solely for the individual
or entity to whom they are addressed.  If you are not the intended recipient you may not rely
on the contents of this email or any attachments, and we ask that you  please not read, copy
or retransmit this communication, but reply to the sender and destroy the email, its contents,
and all copies thereof immediately.  Any unauthorized dissemination, distribution or copying
of this communication is strictly prohibited.

To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org

View raw message