What is notmuch compact and should I use it?

David Bremner david at tethera.net
Sat Sep 16 05:01:31 PDT 2017


Attic Hermit <fjdksl at cock.li> writes:

> What exactly is to compact the database? I noticed that the size of the
> notmuch database is shrunk after `notmuch compact`, but I don't think
> this procedure is gzipping the database. I thought it is something like
> the garbage collecting, but I'm not sure.

Yes, that's approximately correct; notmuch compact is essentially
equivalent to xapian compact

     https://xapian.org/docs/admin_notes.html#compacting-a-database
     
> And should I use it regularly? if it is, how often should it be done?

There is some tradeoff: search should be faster after a compact, but
indexing many messages will likely be slower. For most people this
doesn't matter too much since the number of messages added after the
original index is relatively small.

d



More information about the notmuch mailing list