Sha256: 5edaa7bf9d5947b056c707669980608b2512f22a9261a43a5d132454b17724fa

Contents?: true

Size: 462 Bytes

Versions: 7

Compression:

Stored size: 462 Bytes

Contents

module PgSlice
  class CLI
    desc "analyze TABLE", "Analyze tables"
    option :swapped, type: :boolean, default: false, desc: "Use swapped table"
    def analyze(table)
      table = create_table(table)
      parent_table = options[:swapped] ? table : table.intermediate_table

      analyze_list = parent_table.partitions + [parent_table]
      run_queries_without_transaction(analyze_list.map { |t| "ANALYZE VERBOSE #{quote_table(t)};" })
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pgslice-0.6.1 lib/pgslice/cli/analyze.rb
pgslice-0.6.0 lib/pgslice/cli/analyze.rb
pgslice-0.5.0 lib/pgslice/cli/analyze.rb
pgslice-0.4.8 lib/pgslice/cli/analyze.rb
pgslice-0.4.7 lib/pgslice/cli/analyze.rb
pgslice-0.4.6 lib/pgslice/cli/analyze.rb
pgslice-0.4.5 lib/pgslice/cli/analyze.rb