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

Re: SQLite and SELECT WHERE local_relpath LIKE

From: Florian Weimer <fweimer_at_bfk.de>
Date: Fri, 29 Oct 2010 09:27:41 +0000

* Philip Martin:

>> and that is as slow as LIKE. Adding that "local_relpath =" is the
>> problem, without it I get the children in 0.006s. With it I get the
>> path and the children but it takes 0.35s.
>
> SQL is tricky: I can run a query using either
>
> local_relpath = 'zig1/zag27
>
> or using
>
> local_relpath > 'zig1/zag27/' AND local_relpath < 'zig1/zag270'
>
> and it takes 0.006s, but if I put in both parts in together with OR it
> takes 0.35s. That's 2 orders of magnitude! I suppose I will have to
> try using EXPLAIN.

It seems an optimizer issue. Which version of SQLite do you use?

-- 
Florian Weimer                <fweimer_at_bfk.de>
BFK edv-consulting GmbH       http://www.bfk.de/
Kriegsstraße 100              tel: +49-721-96201-1
D-76133 Karlsruhe             fax: +49-721-96201-99
Received on 2010-10-29 11:28:16 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.