ordering records by the primary key