this method is where most of the action is . up to 2 sorted temporary tables are created , and are passed into sortscan for final merging . concode_field_sep Plan p concode_elem_sep RecordComparator comp concode_elem_sep Transaction tx concode_elem_sep Schema sch concode_field_sep Schema schema concode_elem_sep List<TempTable> splitIntoRuns concode_elem_sep int blocksAccessed concode_elem_sep int distinctValues concode_elem_sep int recordsOutput concode_elem_sep boolean copy concode_elem_sep List<TempTable> doAMergeIteration concode_elem_sep TempTable mergeTwoRuns