sort by primary key by default to avoid duplicate results