Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 69862 invoked from network); 14 May 2007 16:15:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 May 2007 16:15:45 -0000 Received: (qmail 81022 invoked by uid 500); 14 May 2007 16:15:50 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 81002 invoked by uid 500); 14 May 2007 16:15:50 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Delivered-To: moderator for derby-user@db.apache.org Received: (qmail 77125 invoked by uid 99); 14 May 2007 16:13:56 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of david.vancouvering@gmail.com designates 64.233.162.225 as permitted sender) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=AjDJoz6TDyNcAQ/sNRlPgaul+p7SrGcXxALSx9bvRcWF1eiD8AC5UlvwkDxF5AUYT/DsfyVgoTg3fisAvY1iKoyo8m17k0Vm2vDQ3LJd3KmFr8vRv+Ow0sOSeZtME8mGQSHbapS+Yp6yqIlVQcFO4+7Ms/WHZUGwZ6fO/s00nH4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=gIMgXBLxzNZcJIU9005V2gHv8gWqugk+yqp6LOGCrdKSd0qVSUhSaEO7vRaKYtiiH9519X9pUpCkkx4xecKnT6PqJiNOnzrw34U1OVqUztRyAgd01nQqUPDYRzENNYqVY/jBevoG7zOVxVihYVaw1UFso5yzth8FGPPospadlPY= Message-ID: <56a83cd00705140913s1d74e108p804da067c84d8b82@mail.gmail.com> Date: Mon, 14 May 2007 09:13:28 -0700 From: "David Van Couvering" Sender: david.vancouvering@gmail.com To: "Derby Discussion" Subject: Re: maxrows - what does it really mean? In-Reply-To: <20070514114406.GE14950@atum01.norway.sun.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <56a83cd00705111529p22af61e9l4a7dcff9f55fa5bb@mail.gmail.com> <3B344FED-5C5B-47FB-9E3A-9A248E96B1D1@SUN.com> <20070514114406.GE14950@atum01.norway.sun.com> X-Google-Sender-Auth: dc62212e5904d3d9 X-Virus-Checked: Checked by ClamAV on apache.org OK, so do I have it right that the right way to "hint" to the driver to not cache all one million rows when I only need ten rows is to use setMaxRows()? Is there a SQL standard way to "hint" to the server not to *process* all one million rows (e.g. in the order by case)? Thanks, David On 5/14/07, Bernt M. Johnsen wrote: > What David wants, is the feature rgistered in > https://issues.apache.org/jira/browse/DERBY-581 > > >>>>>>>>>>>> Craig L Russell wrote (2007-05-13 12:06:38): > > >Also, how is maxrows related to the fetch size of a ResultSet? > > > > As I understand it, the fetch size relates to the number of rows > > returned by the server to the client for each round trip to the > > database. So theoretically the two numbers are independent. There's > > no specified interaction except for the obvious one: requesting a > > fetch size exceeding the maxrows doesn't make sense since there will > > never be more than maxrows returned, and fetch size would effectively > > be ignored. > > Fetch Size is in the JDBC spec defined to be an *optimization hint* > from the application to the driver. It has no semantic meaning > whatsoever, but may e.g. influence the number of rows prefetched per > roundtrip and thus influence the overall performance of your > application. > > > -- > Bernt Marius Johnsen, Database Technology Group, > Staff Engineer, Technical Lead Derby/Java DB > Sun Microsystems, Trondheim, Norway >