[Xapian-discuss] Read accesses through WritableDatabase are slow
Jean-Francois Dockes
jean-francois.dockes at wanadoo.fr
Mon Oct 23 19:02:10 BST 2006
One (last?) followup. I have sort of worked around the problem by using a
Database object for all read-oriented calls. I was mistaken in thinking
that the WritableDatabase object existence triggered the writes (but not
for the reason supposed in the original answer), I had missed an
allterms_begin() call that went through the WritableDatabase.
The result is at least an order of magnitude faster, and much easier on the
disk drive too.
As there are no or few flushes, which was after all the primary objective,
I don't need to reopen() that much, so this appears to be a really workable
solution. It does feel a little like jumping through hoops though.
Regards,
J.F. Dockes
Olly Betts writes:
> On Mon, Oct 23, 2006 at 09:45:14AM +0200, Jean-Francois Dockes wrote:
> > Except if I'm mistaken, read accesses (like postlist_begin(),
> > get_document()) through a Xapian::WritableDatabase seem to trigger writes
> > on the database files, which makes them slow (because of the fsync()
> > calls).
>
> It depends on the backend, but in general this shouldn't be true for
> most methods of Database when called on a WritableDatabase.
More information about the Xapian-discuss
mailing list