* 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 <fwei...@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