Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
8953a267
Commit
8953a267
authored
May 05, 2020
by
Alper Akgun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Optimize stats threshold for approximate counters
parent
0f48828f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
lib/gitlab/database/count/reltuples_count_strategy.rb
lib/gitlab/database/count/reltuples_count_strategy.rb
+1
-1
No files found.
lib/gitlab/database/count/reltuples_count_strategy.rb
View file @
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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment