copydatabase glass->glass performance curiosity

Olly Betts olly at survex.com
Fri May 24 00:37:45 BST 2019


On Thu, May 23, 2019 at 09:52:11PM +0000, Eric Wong wrote:
> While migrating some DBs from chert-to-glass with copydatabase(1),
> I noticed copying from chert-to-glass was 2-3x faster than copying
> from glass-to-glass.

I'd guess this is due to the change in how term positions are stored.
In chert position lists are stored keyed on <document,term>, but in
glass it's <term,document>.

This is the main reason why glass phrase searches are often much faster,
but for copydatabase it's unhelpful as that loops over documents reading
the positions for each term in the document - in chert that's a linear
scan across the position table key space, while in glass it's a much
more scattered access pattern.

Cheers,
    Olly



More information about the Xapian-devel mailing list