Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> ROWNUM & server performance
Even though ROWNUM limits the data set fetched, does the server generate the
entire data set?
For example:
SELECT id
FROM mytable
WHERE ROWNUM < 100;
Assume that mytable is very large and that id is the primary key. Does the server scan the entire table and return the first 100 rows generated? Or does the server scan the table only until the first 100 rows are fetched?
How else could I process a very large table (iow to chunk it up)?
Thanks
Patrick Received on Fri Nov 11 2005 - 09:10:42 CST