Skip to content

Set per-column statistics targets for PostgreSQL in Rails

License

Notifications You must be signed in to change notification settings

careport/innumerate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

92b2506 · Jun 2, 2022

History

9 Commits
Dec 5, 2018
Dec 5, 2018
Dec 5, 2018
Dec 5, 2018
Dec 4, 2018
Dec 5, 2018
Dec 5, 2018
May 5, 2022

Repository files navigation

innumerate

Set per-column statistics targets for PostgreSQL in Rails

In your ActiveRecord migrations, you can use:

set_statistics_target :users, :email, 1000

... to set the statistics target of users.email to 1000. To make the migration reversible, use the old_target option:

set_statistics_target :users, :email, 1000, old_target: -1

Note that -1 means "use the server's default statistics target."

About

Set per-column statistics targets for PostgreSQL in Rails

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages