> From: "Bill Schneider" <[EMAIL PROTECTED]> > >> I see what you are saying about rownum not being assigned until after all > of >> the WHERE clauses have been evaluated, but surely the same would apply to >> the other RDBMS? > > In other RDBMS, the limit/offset mechanism is separate from the query; it is > applied as a filter after the query is run. In Oracle, it's part of the > query condition itself. I imagine that internally, dbs that support native > offsets are just as inefficient as wrapping the query; you can't figure out > the 100th row the query is going to return without knowing what the first 99 > rows to suppress are. > > It never really makes sense to have a condition like "where rownum > 10" in > an Oracle query, because the first query that gets returned is always row > #1. If you restrict to rownum>10, then the 10th row in the originally query > actually becomes row #1, and is no longer the 10th row... you get the > picture. In fact, if you ever issue a query like "select * from table where > rownum > 10" to Oracle, you will never get a single row returned. > > -- Bill
Excellent info. Thanks Bill, Scott -- Scott Eade Backstage Technologies Pty. Ltd. Web: http://www.backstagetech.com.au -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
