How can you achieve better performance for this requirement?