To optimize the find record of chat