On 11/26/2012 5:56 PM, Walter Underwood wrote:
You can optimize during updates, but you should not optimize at all, especially if you are doing continuous updates. Hands off that knob.
I promise I'm not optimizing just because it's got a cool name, or because a README/HOWTO said to do it. I optimize my tiny index once an hour, and the large indexes once every six days (one of them gets optimized every day, using DAY_OF_YEAR % 6).
The only reason I do the optimizes is to expunge deletes. The indexer program does inserts, reinserts, and deletes once a minute, most of which hit the tiny index. On the large indexes, between 25000 and 500000 documents get deleted over the course of the six day optimize interval.
Thanks, Shawn