The sorting function sorts all games in a database. You can select a number of sort criteria. When two games are equal according to the the first criteria, they are sorted using the second criteria, and so on.
The available sorting criteria are:
When you sort a ChessDB database that is not read-only, the sort results are saved so the order of games in the database is permanently changed. If you want to the sort results to be temporary, make the database read-only first using the File: Read-only menu command.
When you sort a database that is read-only or is actually a PGN file, the sort results cannot be saved so the sorted order of games will be lost when the file is closed.
Note that sorting a database resets the search filter to contain all games.
When a database is sorted, the index file is altered but the game file is not changed. This means sorting a database will leave the game file records in a scrambled order relative to the index file. This can really slow down tree, position and material/pattern searches, so you should reorder the game file by compacting it after sorting the database to maintain good search performance.