It requires algorithms that first establish and then fine-tune the optimal period over which to do the sorting.
不能称 over which 是关系代词,而 which 是关系代词。这是关系代词之前加介词,which 指代 period。
定语从句根据其结构,可以有几种格式,这里 over which to do the sorting 是“省略式定语从句”,意思是承前省略了主语和部分谓语动词。即:over which it (algorithms) is to do the sorting. 修饰 period。
由于本句前面已经有了一个定语从句 that first....,为避免重复啰嗦,用了一个省略式定语从句。