On Tue, Jun 27, 2006 at 02:06:12PM -0400, Rocco Caputo
wrote:> Are there known cases where remote database access is 2-6 times
> slower than local access to the same database?
I'm not aware of any profiling work on the remote database since webtop
were using it, which was quite some time ago.
But I have a mostly complete reworked remote backend which removes
unnecessary layers of classes in various places and simplifies how
the matcher interfaces with the remote backend so it might be better
for you to look at that than the current code. I'll try to sort
out a patch so you can try it.
> I'm seeing cases where queries over Xapian::Remote can take several
> times longer than identical queries run locally. I'm making sure
> that my queries are not cached. I'm using the match set's fetch()
> method, which has already sped up remote queries by an order of
> magnitude.
Hmm, I did some tests on my new code and found that calling fetch() was
actually slower on average than not calling it, so it's currently a
no-op pending reworking it to be a bit lazier which I think will help.
I wonder if my test case is just different to yours, or if this is
due to changed code elsewhere.
> Network speed doesn't seem to be the cause. Cached remote queries
> take only 1-2 seconds longer than cached local ones.
Do you have document values? The remote backend currently always sends
them over with the document data so if you don't use the document values
during the match or for displaying results then the remote backend will
be slower especially if the values aren't cached.
I don't think it makes sense to do that - the values should only be
passed over if they are needed, or perhaps if we have a particular
reason to think they will be needed (e.g. reading values on one document
might cause them to be passed over automatically for the next).
Cheers,
Olly