Modify SQL index queries