What is the best way to keep the indexes of a database up-to-date? I have created a database with the option UPDINDEX set to ON (and db-info tells me that it is indeed switched on) and I have also created text and attribute indexes. Even so, after several insertions (using XQUERY insert node) I see that the UPTODATE flag is no longer checked and I have to run OPTIMIZE ALL to get back my performance. a) Is there a way to keep UPTODATE checked under all circumstances? And if not b) Is is advisable to run OPTIMIZE ALL after every insertion? (I guess not)