pgvector ivfflat index build-time parameters
Pgvector has a lists parameter that should be set as follows: For datasets with less than one million rows, use lists = rows / 1000. For datasets with more than one million rows, use lists = sqrt(rows). It is generally advisable to have at least 10 clusters.
You can use the following code to simplify creating ivfflat indexes: