From 4cb3e9f7c7a22895f7b8433e96ff57beff93d515 Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Mon, 13 Jan 2020 18:06:25 +1100 Subject: [PATCH] chore: use union all to speed up query --- lib/pact_broker/matrix/quick_row.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pact_broker/matrix/quick_row.rb b/lib/pact_broker/matrix/quick_row.rb index ad0df8d9b..181d9dfdd 100644 --- a/lib/pact_broker/matrix/quick_row.rb +++ b/lib/pact_broker/matrix/quick_row.rb @@ -152,7 +152,7 @@ def matching_one_selector(selectors) def pacticipant_ids_matching_one_selector_optimised(selectors) query_ids = QueryIds.from_selectors(selectors) distinct_pacticipant_ids_where_consumer_or_consumer_version_matches(query_ids) - .union(distinct_pacticipant_ids_where_provider_or_provider_version_matches(query_ids)) + .union(distinct_pacticipant_ids_where_provider_or_provider_version_matches(query_ids), all: true) end def distinct_pacticipant_ids_where_consumer_or_consumer_version_matches(query_ids)