How to speed up indexing?