Skip to content

Commit b65adf4

Browse files
committed
Use DISTINCT instead of DINSTINCT ON for /v3/service_instances
On large foundations using PostgreSQL DISTINCT ON might lead to wrong query plans making the resulting execution very slow.
1 parent f501372 commit b65adf4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/fetchers/service_instance_list_fetcher.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def fetch(message, omniscient: false, readable_spaces_dataset: nil, eager_loaded
2323

2424
filter(dataset, message).
2525
select_all(:service_instances).
26-
distinct(:service_instances__id)
26+
distinct
2727
end
2828

2929
private

0 commit comments

Comments
 (0)