[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1081484 - in /subversion/trunk/subversion/libsvn_wc: wc-queries.sql wc_db.c

From: Branko ─îibej <brane_at_e-reka.si>
Date: Mon, 28 Mar 2011 13:37:53 +0200

On 28.03.2011 13:32, Stefan Sperling wrote:
> On Sat, Mar 26, 2011 at 09:46:48AM -0400, Greg Stein wrote:
>> If it only needs to detect a single row, then LIMIT 1 should be in the
>> query.
> Is there really a significant difference between LIMIT 1 and not stepping
> through more than one result row?

I'd expect there to be a difference in the amount of memory used and
duration of the sqlite transaction.

> I'd rather keep the queries reusable for contexts where a complete
> list of modified nodes is required, instead of adding COUNT() (as
> suggested elsewhere) or LIMIT 1.

Well ... one can't actually parametrize the statements like this (you
can parametrize the limit, but not the existence of a limit clause). I
like reusable statements too, but on the other hand, I believe in doing
as much as possible within the query engine. It always makes a
difference, if nowhere else, then in the complexity of the processing code.

-- Brane
Received on 2011-03-28 13:38:29 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.