summaryrefslogtreecommitdiff
path: root/lib/gitlab/database/migrations/observers/query_statistics.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/database/migrations/observers/query_statistics.rb')
-rw-r--r--lib/gitlab/database/migrations/observers/query_statistics.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/gitlab/database/migrations/observers/query_statistics.rb b/lib/gitlab/database/migrations/observers/query_statistics.rb
index 54504646a79..2d026f0c8d2 100644
--- a/lib/gitlab/database/migrations/observers/query_statistics.rb
+++ b/lib/gitlab/database/migrations/observers/query_statistics.rb
@@ -22,6 +22,7 @@ module Gitlab
observation.query_statistics = connection.execute(<<~SQL)
SELECT query, calls, total_time, max_time, mean_time, rows
FROM pg_stat_statements
+ WHERE pg_get_userbyid(userid) = current_user
ORDER BY total_time DESC
SQL
end