https://github.com/adjust/pg_nice_cluster
a tool to use cluster while being able to read from tables
https://github.com/adjust/pg_nice_cluster
Last synced: about 1 year ago
JSON representation
a tool to use cluster while being able to read from tables
- Host: GitHub
- URL: https://github.com/adjust/pg_nice_cluster
- Owner: adjust
- License: mit
- Archived: true
- Created: 2012-09-04T15:55:10.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2013-09-30T18:23:34.000Z (over 12 years ago)
- Last Synced: 2025-03-09T14:41:38.551Z (over 1 year ago)
- Language: Ruby
- Size: 145 KB
- Stars: 0
- Watchers: 77
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pg_nice_cluster
this is a little tool to help you use the CLUSTER command of postgres while maintaining the ability to read from the table.
## installation
in your Gemfile add
gem 'pg_nice_cluster', :git => 'git://github.com/adeven/pg_nice_cluster.git'
then
bundle install
## usage
pg_nice_cluster --help
Options:
--db, -d : database name
--user, -u : user name (default: postgres)
--pass, -p : password
--host, -h : host name (default: localhost)
--prefix, -r : prefix for the temporary tables and indexes (default 'cluster_') (default: cluster)
--minsize, -m : cut off size for small tables in mb (default: 100)
--table, -t : table name if only one table should be clustered
--index, -i : index to cluster on when using single table (otherwise ignored)
--help, -e: Show this message
## requirements
* tables will be EXCLUSIVE locked for the operation
* enough disk space for the biggest table times two
* enough ram for the indexes of the table with the largest combined indexes
* depending on your table size, quite some time