A system such as a database management system determines a rule to impose sorted order upon a column without applying a sorting algorithm to the column and stores the rule to be applied to sort the column. In an embodiment, a permutation is the rule. The column, in an embodiment, is a column of a database table. In some cases, the rule is used to efficiently impose a correct sorted order on a subset of unsorted columns without the use of a sorting algorithm. In some cases, the rule is generated based at least in part on another column that is sorted using a sorting algorithm such as quicksort.