Path: dp-news.maxwell.syr.edu!spool.maxwell.syr.edu!drn.maxwell.syr.edu!news.maxwell.syr.edu!newscon02.news.prodigy.com!prodigy.net!pd7cy2so!shaw.ca!pd7tw1no.POSTED!53ab2750!not-for-mail X-Trace-PostClient-IP: 68.147.131.165 From: "Patrick Demets" Newsgroups: comp.databases.oracle.server Subject: ROWNUM & server performance Lines: 21 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Message-ID: Date: Fri, 11 Nov 2005 15:10:42 GMT NNTP-Posting-Host: 24.71.223.147 X-Complaints-To: abuse@shaw.ca X-Trace: pd7tw1no 1131721842 24.71.223.147 (Fri, 11 Nov 2005 08:10:42 MST) NNTP-Posting-Date: Fri, 11 Nov 2005 08:10:42 MST Organization: Shaw Residential Internet Xref: dp-news.maxwell.syr.edu comp.databases.oracle.server:255226 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