fdb: sort final result, not intermediates