diff --git a/README.md b/README.md index ad19a3d..4fbab03 100644 --- a/README.md +++ b/README.md @@ -744,6 +744,17 @@ REINDEX INDEX CONCURRENTLY index_name; VACUUM table_name; ``` +## Scaling + +Scale vertically by increasing memory, CPU, and storage on a single instance. Use existing tools to [tune parameters](#tuning) and [monitor performance](#monitoring). + +For a smaller working set: + +1. Use the `halfvec` type instead of `vector` for tables +2. Use [binary quantization](#binary-quantization) for indexes (with re-ranking for search) + +Scale horizontally with [replicas](https://www.postgresql.org/docs/current/hot-standby.html), or use [Citus](https://github.com/citusdata/citus) or another approach for sharding ([example](https://github.com/pgvector/pgvector-python/blob/master/examples/citus/example.py)). + ## Monitoring Monitor performance with [pg_stat_statements](https://www.postgresql.org/docs/current/pgstatstatements.html) (be sure to add it to `shared_preload_libraries`). @@ -769,17 +780,6 @@ SELECT ... COMMIT; ``` -## Scaling - -Scale vertically by increasing memory, CPU, and storage on a single instance. Use existing tools to [tune parameters](#tuning) and [monitor performance](#monitoring). - -For a smaller working set: - -1. Use the `halfvec` type instead of `vector` for tables -2. Use [binary quantization](#binary-quantization) for indexes (with re-ranking for search) - -Scale horizontally with [replicas](https://www.postgresql.org/docs/current/hot-standby.html), or use [Citus](https://github.com/citusdata/citus) or another approach for sharding ([example](https://github.com/pgvector/pgvector-python/blob/master/examples/citus/example.py)). - ## Languages Use pgvector from any language with a Postgres client. You can even generate and store vectors in one language and query them in another.