optimization query data for index