Improved secondary index query support