gitlab-org--gitlab-foss/lib/gitlab/database
Stan Hu b35a6880b9 Fix counting of groups in admin dashboard
1. Ignore tables that use STI in reltuples count strategy.

   Models that use Rails' single-type inheritance, such as `Group` and
   `CiService`, need an additional WHERE clause to count the total
   properly, which isn't supported by the reltuples strategy.  For now,
   we just omit these from the statistics sampling and rely on the other
   strategies to get this data.

2. Fix tablesample count strategy not counting groups properly.

   Models such as `Group` needs a WHERE clause to distinguish it from
   namespaces. We now add in the WHERE clause if STI is in use.

Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/7435
2019-03-11 23:50:47 -07:00
..
count Fix counting of groups in admin dashboard 2019-03-11 23:50:47 -07:00
rename_reserved_paths_migration Remove rails4 specific code 2018-12-16 10:48:41 +01:00
count.rb Use approximate counts for big tables 2018-12-06 16:07:14 +00:00
date_time.rb Enable even more frozen string in lib/gitlab 2018-11-06 22:47:32 -08:00
grant.rb Enable even more frozen string in lib/gitlab 2018-11-06 22:47:32 -08:00
median.rb Remove rails4 specific code 2018-12-16 10:48:41 +01:00
migration_helpers.rb Remove rails4 specific code 2018-12-16 10:48:41 +01:00
multi_threaded_migration.rb Enable even more frozen string in lib/gitlab 2018-11-06 22:47:32 -08:00
read_only_relation.rb Enable even more frozen string in lib/gitlab 2018-11-06 22:47:32 -08:00
sha_attribute.rb Remove rails4 specific code 2018-12-16 10:48:41 +01:00
subquery.rb Remove rails4 specific code 2018-12-16 10:48:41 +01:00