mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-07 13:10:56 +08:00
Added section on performance [skip ci]
This commit is contained in:
14
README.md
14
README.md
@@ -128,6 +128,20 @@ CREATE INDEX ON table USING ivfflat (column) WHERE (other_column = 123);
|
|||||||
|
|
||||||
To index many different values of `other_column`, consider [partitioning](https://www.postgresql.org/docs/current/ddl-partitioning.html) on `other_column`.
|
To index many different values of `other_column`, consider [partitioning](https://www.postgresql.org/docs/current/ddl-partitioning.html) on `other_column`.
|
||||||
|
|
||||||
|
## Performance
|
||||||
|
|
||||||
|
To speed up queries without an index, increase `max_parallel_workers_per_gather`.
|
||||||
|
|
||||||
|
```sql
|
||||||
|
SET max_parallel_workers_per_gather = 4;
|
||||||
|
```
|
||||||
|
|
||||||
|
To speed up queries with an index, increase the number of inverted lists.
|
||||||
|
|
||||||
|
```sql
|
||||||
|
CREATE INDEX ON table USING ivfflat (column) WITH (lists = 1000);
|
||||||
|
```
|
||||||
|
|
||||||
## Reference
|
## Reference
|
||||||
|
|
||||||
### Vector Type
|
### Vector Type
|
||||||
|
|||||||
Reference in New Issue
Block a user