I've been thinking about this for a while, and especially with the query
time escalation code, have found that the queries which do full header
searches are incredibly slow (for the obvious reason that they cannot use
the index).

I have two thoughts here. First, our imap search algorithm is based on
merging multiple independent queries. We should do some planning so that a
search that includes a free-text headervalue query does all of the other
queries first, finds the possible result set, then chunks out the
headervalue scan.

For example, I often do a search limited by date:

  SEARCH SINCE SINCE 1-Feb-2007 FROM dbmail

This currently breaks into two queries that search all messages, the
latter of which has a "WHERE headervalue LIKE '%dbmail%'", and takes about
25 seconds and boatloads of CPU when running against my Inbox of 30,000
messages. Restricting it to the most recent few thousand would make it
much much faster.

Second thought is http://sphinxsearch.com/

Aaron
_______________________________________________
Dbmail-dev mailing list
Dbmail-dev@dbmail.org
http://twister.fastxs.net/mailman/listinfo/dbmail-dev

Reply via email to