various searches and sorts in memory and disk based systems