Open indexes in shared mode to reduce memory usage

First step in reducing the memory footprint of the global index creation for reading