debian-mirror-gitlab/lib/gitlab/database/postgres_index_bloat_estimate.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
543 B
Ruby
Raw Normal View History

2021-02-22 17:27:13 +05:30
# frozen_string_literal: true
module Gitlab
module Database
# Use this model with care: Retrieving bloat statistics
# for all indexes can be expensive in a large database.
#
# Best used on a per-index basis.
2021-12-11 22:18:48 +05:30
class PostgresIndexBloatEstimate < SharedModel
2021-02-22 17:27:13 +05:30
self.table_name = 'postgres_index_bloat_estimates'
self.primary_key = 'identifier'
belongs_to :index, foreign_key: :identifier, class_name: 'Gitlab::Database::PostgresIndex'
alias_attribute :bloat_size, :bloat_size_bytes
end
end
end