You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/pgvecto_rs/admin/migration.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,7 @@ SHOW search_path;
62
62
SET search_path = "$user, public";
63
63
```
64
64
65
-
#### 2. Check exist indexes
65
+
#### 2. Check existing indexes
66
66
67
67
For indexes created at vector columns, please retrieve the definition and record it in a convenient location. This information is necessary for the recovery of the indexes at a later stage.
Copy file name to clipboardExpand all lines: src/pgvecto_rs/admin/upgrading.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,7 @@ You may get this error if some [indexes](../usage/indexing.md) were created befo
55
55
56
56
```
57
57
ERROR: index public.this_is_index depends on operator class vector_cos_ops for access method vectors
58
-
index public.this_is_index depends on operator class vector_cos_ops for access method vectorscannot drop operator class vector_cos_ops for access method vectors because other objects depend on it
58
+
index public.this_is_index depends on operator class vector_cos_ops for access method vectors cannot drop operator class vector_cos_ops for access method vectors because other objects depend on it
59
59
60
60
ERROR: cannot drop operator class vector_cos_ops for access method vectors because other objects depend on it
Copy file name to clipboardExpand all lines: src/pgvecto_rs/integration/langchain.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -135,7 +135,7 @@ Score: 0.29536954
135
135
- 💃 **Easy to use**: pgvecto.rs is a Postgres extension, which means that you can use it directly within your existing database. This makes it easy to integrate into your existing workflows and applications.
136
136
- 🔗 **Async indexing**: pgvecto.rs's index is asynchronously constructed by the background threads and does not block insertions and always ready for new queries.
137
137
- 🥅 **Filtering**: pgvecto.rs supports filtering. You can set conditions when searching or retrieving points. This is the missing feature of other postgres extensions.
138
-
- 🧮 **Quantization**: pgvecto.rs supports scalar quantization and product qutization up to 64x.
138
+
- 🧮 **Quantization**: pgvecto.rs supports scalar quantization and product quantization up to 64x.
139
139
- 🦀 **Rewrite in Rust**: Rust's strict compile-time checks ensure memory safety, reducing the risk of bugs and security issues commonly associated with C extensions.
Copy file name to clipboardExpand all lines: src/pgvecto_rs/use-case/adaptive-retrieval.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ But you could safely remove some numbers from the end of the sequence and still
14
14
15
15
::: details
16
16
17
-
You may need normalization to ensure that the shortened embeddings compatible with some distance calculation e.g. dot poroduct. OpenAI's API will help you on this if you are calling `text-embedding-3-large` to generate a lower dimension embedding directly, instead of truncating the original embeddings on your own.
17
+
You may need normalization to ensure that the shortened embeddings compatible with some distance calculation e.g. dot product. OpenAI's API will help you on this if you are calling `text-embedding-3-large` to generate a lower dimension embedding directly, instead of truncating the original embeddings on your own.
This will install vectorchord and pgvector at public schema, if other schema is picked, please subsititue`public` with your schema at the migration command.
58
+
This will install vectorchord and pgvector at public schema, if other schema is picked, please substitute`public` with your schema at the migration command.
59
59
60
60
:::
61
61
@@ -80,7 +80,7 @@ postgres=# \dx
80
80
81
81
:::
82
82
83
-
#### 2. Check exist indexes
83
+
#### 2. Check existing indexes
84
84
85
85
For indexes created at vector columns, please retrieve the definition and record it in a convenient location.
86
86
This information is necessary for the recovery of the indexes at a later stage.
@@ -145,7 +145,7 @@ spherical_centroids = false
145
145
$$);
146
146
```
147
147
148
-
For more information of create index at `VectorChord`, see [indexing](../usage/indexing).
148
+
For more information on creating index at `VectorChord`, see [indexing](../usage/indexing).
Copy file name to clipboardExpand all lines: src/vectorchord/usage/postgresql-tuning.md
+18-15Lines changed: 18 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,12 @@
1
1
# PostgreSQL Tuning
2
2
3
-
## Indexing
4
-
5
3
Indexing may be parallelized. Parallelism increases server load and is therefore not enabled by default in PostgreSQL. To enable it, refer to the following SQL.
6
4
7
5
```sql
8
6
-- Sets the maximum number of background processes that the cluster can support.
9
-
-- It's recommended to set it to the sum of your desired parallelism plus 8.
10
-
-- For example, if you want to use 16 threads for parallel processing, set the value to 24.
7
+
-- It's recommended to set it to at least the sum of your desired parallelism plus 8.
8
+
-- For example, if you want to use 16 threads for parallel processing, set the value at least to 24.
9
+
-- Depending on your workload, this value might be useful to be higher.
11
10
-- Note: A restart is required for this setting to take effect.
12
11
ALTER SYSTEM SET max_worker_processes =24;
13
12
@@ -28,27 +27,31 @@ The number of parallel workers also depends on the table's configuration. By def
28
27
ALTERTABLE items set (parallel_workers =15);
29
28
```
30
29
31
-
## Search
32
-
33
-
To ensure the search performs efficiently, you may need to adjust some PostgreSQL parameters.
30
+
You need to tune a few settings to improve I/O performance.
34
31
35
32
```sql
36
-
-- Sets the amount of memory the database server uses for shared memory buffers.
37
-
-- For typical database workloads, this value is recommended to be 40% of the total memory.
38
-
-- For vector database workloads, this value is recommended to be 80% of the total memory.
39
-
-- Note: A restart is required for this setting to take effect.
40
-
ALTER SYSTEM SET shared_buffers ='16GB';
41
-
42
33
-- Sets the number of concurrent disk I/O operations that PostgreSQL expects can be executed simultaneously.
43
34
-- It's recommended to set it to 200 when using SSDs for storage.
44
35
SET effective_io_concurrency =200;
45
36
SET maintenance_io_concurrency =200;
37
+
```
38
+
39
+
We have observed that in certain cases, malfunctioning JIT can negatively impact performance. If you do not rely on it, you may choose to disable it.
46
40
47
-
-- We have observed that in certain cases, malfunctioning JIT can negatively impact performance.
48
-
-- If you do not rely on it, you may choose to disable it.
41
+
```sql
49
42
SET jit = off;
50
43
```
51
44
45
+
Finally, you need to set the size of PostgreSQL's shared buffers.
46
+
47
+
```sql
48
+
-- Sets the amount of memory the database server uses for shared memory buffers.
49
+
-- Depending on your workload, this value is recommended to be 25%~40% of the total memory.
50
+
-- For vector database workloads, this value might be useful to be 80% of the total memory.
51
+
-- Note: A restart is required for this setting to take effect.
52
+
ALTER SYSTEM SET shared_buffers ='16GB';
53
+
```
54
+
52
55
## Asynchronous I/O {#asynchronous-i-o}
53
56
54
57
PostgreSQL 17 introduced the streaming I/O API for the first time. Building on this, PostgreSQL 18 introduces asynchronous I/O. With asynchronous I/O, PostgreSQL can initiate multiple read operations and continue processing while waiting for the results. This can improve the performance of queries that need to read large amounts of data from disk. PostgreSQL offers multiple asynchronous I/O methods. You can adjust them as needed.
0 commit comments