diff options
Diffstat (limited to 'lib/gitlab/database/count.rb')
-rw-r--r-- | lib/gitlab/database/count.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/database/count.rb b/lib/gitlab/database/count.rb index 01fabcced65..8af462da4a6 100644 --- a/lib/gitlab/database/count.rb +++ b/lib/gitlab/database/count.rb @@ -172,6 +172,10 @@ module Gitlab {} end + def self.enabled? + Gitlab::Database.postgresql? && Feature.enabled?(:tablesample_counts) + end + private def perform_count(model, estimate) # If we estimate 0, we may not have statistics at all. Don't use them. |