[Xapian-discuss] About sorting by date (Performance)

Olly Betts olly at survex.com
Mon Dec 19 07:08:23 GMT 2005


On Sun, Dec 18, 2005 at 04:23:03AM -0900, Rafael Jorge wrote:
> Hi all, following this thread
> http://thread.gmane.org/gmane.comp.search.xapian.general/1922

Hmm, my option (b) in that thread isn't actually an option.  I've
replied to the thread with a correction for posterity.

> now I can sort my results by date, but the performance is very low
> (searches beetween 1~10 seconds), I want know if my problem is with
> Xapian or my hardware+software, look:

Hmm, it's not a large database (Gmane is using the same trick to
implement "sort by date" on almost 30 million documents), and the
hardware sounds reasonable.

Some thoughts:

You could try compacting the database (run it through quartzcompact).

You could try using the new flint backend instead of quartz (flint
databases can also be compacted with xapian-compact, but they do a
better job of staying more compact in normal use so the gains are
likely to be less):

http://wiki.xapian.org/FlintBackend

Also worth seeing if you're using $topterms in your query template (the
default templates/query uses it currently though I'm wondering about
removing it to a separate template).  As currently implemented,
calculating the topterms can be expensive on larger databases.

Cheers,
    Olly



More information about the Xapian-discuss mailing list