adding indexes optimizations