db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Van Couvering <da...@vancouvering.com>
Subject setMaxRows and database behavior
Date Thu, 17 Jun 2010 05:39:39 GMT
Hi, all!  When I use setMaxRows() in JDBC, I know it limits the number of
rows delivered through JDBC.  I just wanted to confirm that when I use this,
Derby doesn't still scan through all rows and then deliver maxRows number of
rows to JDBC - that it only actually goes through the first N rows (assuming
my query uses an index).

e.g.

SELECT id FROM mytable

with setMaxRows(5)

Derby will only go through the first 5 rows in the index...  right?

Thanks!

David

-- 
David W. Van Couvering

http://www.linkedin.com/in/davidvc
http://davidvancouvering.blogspot.com
http://twitter.com/dcouvering

Mime
View raw message