mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-11 23:26:55 +08:00
Added example of AVG [skip ci]
This commit is contained in:
@@ -71,6 +71,12 @@ SELECT * FROM items WHERE embedding <-> '[3,1,2]' < 5;
|
|||||||
|
|
||||||
Note: Combine with `ORDER BY` and `LIMIT` to use an index
|
Note: Combine with `ORDER BY` and `LIMIT` to use an index
|
||||||
|
|
||||||
|
Get the average of vectors
|
||||||
|
|
||||||
|
```sql
|
||||||
|
SELECT AVG(embedding) FROM items;
|
||||||
|
```
|
||||||
|
|
||||||
## Indexing
|
## Indexing
|
||||||
|
|
||||||
Speed up queries with an approximate index. Add an index for each distance function you want to use.
|
Speed up queries with an approximate index. Add an index for each distance function you want to use.
|
||||||
|
|||||||
Reference in New Issue
Block a user