[Csync2] recursive selects with sqlite
Lars Ellenberg
lars.ellenberg at linbit.com
Wed Oct 22 21:26:00 CEST 2008
On Wed, Oct 22, 2008 at 08:16:38PM +0200, Lars Ellenberg wrote:
> On Wed, Oct 22, 2008 at 05:41:03PM +0200, Art -kwaak- van Breemen wrote:
> > Hi,
> >
> > On Wed, Oct 22, 2008 at 04:39:05PM +0200, Lars Ellenberg wrote:
> > > but: my benchmarks show that it is in fact a HUGE improvement (factor 20
> > > or so in my test setup) in case it is a recursive operation on a
> > > non-recursive, single filename.
> > >
> > > but the union DOUBLES the time compared to the "select this or (that and something)"
> > > when it _is_ a recursive operation.
> > I've got some real live values ;-) :
>
> I thought so...
>
> can you please repeat these test, for four variations:
>
> > /dev/null
> export LANG=C LC_ALL=C ; > /dev/null
>
> | wc -l
> export LANG=C LC_ALL=C ; | wc -l
>
> I expect some interessting results...
ah, right. cache preheating...
start with cat *.db > /dev/null
;)
just curious: ls -l *.db ?
select count(*)?
>
> > Anyway:
> > asdf clearly does not exist.
> > 0.big.gen.jpg is a single file
> > 0 is a rather large directory, but totals less than 10% of the
> > database ;-).
> >
> > I've run it a few times after stopping inetd on an idle system
> > with 4G memory.
> >
> > I've noticed the slowdown on sqlite2, and that's the reason that
> > I switched to sqlite3, which did not solve this particular
> > problem, so I fixed it to union all ;-).
> >
> > I can try dumping the sqlite3 database into an sqlite2 database
> > just to make sure...
>
> won't hurt to know for both sqlite3 and sqlite2.
>
> thanks,
>
> --
> : Lars Ellenberg
> : LINBIT | Your Way to High Availability
> : DRBD/HA support and consulting http://www.linbit.com
>
> DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
> _______________________________________________
> Csync2 mailing list
> Csync2 at lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/csync2
>
--
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com
DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
More information about the Csync2
mailing list