I was able to get the result using eventstats comamnd below but by using that the search runs slower than without filtering. is there other way to filter this early or without using event stats that will improve the overall search time. my normal search takes 5secs but when I add the eventstats command and filtering it takes 15seconds.
| base search
| eventstats max(time_stamp) as latest_timestamp
| where time_stamp = latest_timestamp