Using a grid index file in multi-dim queries