Time Complexities of Table Joins If both tables are sorted, the sort-merge algorithm performs the best.