Analyze routing table right after creating it

Problem

We need to analyze each routing table to make sure partitioning pruning is being done efficiently.

For this, we write the following migration:

disable_statement_timeout do
  execute('ANALYZE VERBOSE p_ci_pipeline_variables;')
end

Solution

  • Automate routing table analysis when creating our routing table

https://gitlab.com/gitlab-org/gitlab/-/blob/fc96700caf2b41e66e342ff489044599bb2c4edd/lib/gitlab/database/partitioning/list/convert_table.rb#L46-65

cc @mbobin @panoskanell

Assignee Loading
Time tracking Loading