There are sorting algorithms the performance of which is a simple linear function of R, the number of records sorted; but you do not want to use them.
Respectable sorting algorithms on the other hand, are faster, often much faster, for ordered-in-part data than they are unordered data. (A simple bubble sort, for example, makes only one pass over a [multi]set of already ordered records.) Sorting the same [multi]set of records in different input sequences into the same output sequence does not usually, that is, take the same amount of time. I imagine that Chris Blaicher, who is invariably helpful here to users of his company's product, will be able to give you some more concretely useful advice. John Gilmore, Ashland, MA 01721 - USA ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
