Optimize queries for project index