Commit fa84e87e authored by Andreas Brandl's avatar Andreas Brandl

Merge branch...

Merge branch '210363-statistics-are-not-updated-in-time-for-approximate-counters-usage' into 'master'

Optimize stats threshold for approximate counters

See merge request gitlab-org/gitlab!31137
parents 6e5ddb07 8953a267
......@@ -72,7 +72,7 @@ module Gitlab
# @param [Array] table names
# @returns [Hash] Table name to count mapping (e.g. { 'projects' => 5, 'users' => 100 })
def get_statistics(table_names, check_statistics: true)
time = 1.hour.ago
time = 6.hours.ago
query = PgClass.joins("LEFT JOIN pg_stat_user_tables USING (relname)")
.where(relname: table_names)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment