summaryrefslogtreecommitdiff
path: root/app/finders/issuable_finder.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/finders/issuable_finder.rb')
-rw-r--r--app/finders/issuable_finder.rb13
1 files changed, 10 insertions, 3 deletions
diff --git a/app/finders/issuable_finder.rb b/app/finders/issuable_finder.rb
index 9c4aecedd93..d431c3e3699 100644
--- a/app/finders/issuable_finder.rb
+++ b/app/finders/issuable_finder.rb
@@ -153,10 +153,8 @@ class IssuableFinder
end
def row_count
- fast_fail = Feature.enabled?(:soft_fail_count_by_state, params.group || params.project)
-
Gitlab::IssuablesCountForState
- .new(self, nil, fast_fail: fast_fail)
+ .new(self, nil, fast_fail: true)
.for_state_or_opened(params[:state])
end
@@ -341,6 +339,15 @@ class IssuableFinder
cte << items
items = klass.with(cte.to_arel).from(klass.table_name)
+ elsif Feature.enabled?(:pg_hint_plan_for_issuables, params.project)
+ items = items.optimizer_hints(<<~HINTS)
+ BitmapScan(
+ issues idx_issues_on_project_id_and_created_at_and_id_and_state_id
+ idx_issues_on_project_id_and_due_date_and_id_and_state_id
+ idx_issues_on_project_id_and_updated_at_and_id_and_state_id
+ index_issues_on_project_id_and_iid
+ )
+ HINTS
end
items.full_search(search, matched_columns: params[:in], use_minimum_char_limit: !use_cte_for_search?)