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

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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