Is it enough to call OPTIMIZE INDEX?


Is it enough periodicaly call OPTIMIZE INDEX to optimize RT index to its “best” state? Or may be i need some other index maintenance? For example rebuild index via plain index and ATTACH INDEX? Does this have sense?


What you can do more is to dump also the RAM chunk (with FLUSH RAMCHUNK) before doing OPTIMIZE.
If you still get more than 1 disk chunk after optimize, means you have string/json attributes of more than 4GB. In this case getting more out of it is to do a local distributed RT (this will change in v3 when 4GB string/json attrs limitation will be lifted).
With ATTACH you can created an ‘already optimized’ RT, as it will have a single chunk. But after this, as you push data to the RT and new disk chunks will be created, you still need to run OPTIMIZE.