On Tuesday 30 October 2007 12:01:54 Jorge Godoy wrote:
> Em Tuesday 30 October 2007 07:49:12 Diez B. Roggisch escreveu:
> > ORACLE doesn't even know limit - you can fake that using "ROWNUM < x",
> > but the offset won't work either.
> >
> > So I'm in favor of making the use of limit + offset configurable. But
> > actually turn them off totally I'd prefer, because of above mentioned
> > limits of other DBs.
>
> But please, make it simple to turn it on so that the DBs that support that
> feature can benefit of it.

The default would certainly be "on", to prevent breakage.

> Maybe a special case for Oracle that would use the "rownum < x" idiom would
> be better than having it off...

certainly not! TG uses SO and SA to abstract from that. Introducing 
DB-depended code would have to go in there, if anywhere.

Apart from that, it's not much use emulating the offset whilst creating a 
limit like above: cursors are lazy. So iterating to the point where the 
pagination is supposed to start and then fetching one page has the exact same 
cost as not applying any limit at all.

the _real_ benefit is the offset - which lets the DB discard the first n 
entries. But this isn't supported by quite a few DBs.

Diez

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to