-
- Downloads
Fix Error 500 viewing admin page due to statement timeouts
Uses PostgreSQL tuple estimates to provide a much faster yet approximate count. See https://wiki.postgresql.org/wiki/Slow_Counting for more details. We only use this fast method if the table has been analyzed or vacuumed within the last hour. Closes #46255
Showing
- app/controllers/admin/dashboard_controller.rb 2 additions, 0 deletionsapp/controllers/admin/dashboard_controller.rb
- app/helpers/count_helper.rb 5 additions, 0 deletionsapp/helpers/count_helper.rb
- app/views/admin/dashboard/index.html.haml 10 additions, 10 deletionsapp/views/admin/dashboard/index.html.haml
- lib/gitlab/database/count.rb 48 additions, 0 deletionslib/gitlab/database/count.rb
- spec/lib/gitlab/database/count_spec.rb 62 additions, 0 deletionsspec/lib/gitlab/database/count_spec.rb
app/helpers/count_helper.rb
0 → 100644
lib/gitlab/database/count.rb
0 → 100644
spec/lib/gitlab/database/count_spec.rb
0 → 100644
Please register or sign in to comment