I'm using Supabase with pgvector for a vector search use case and I'm experiencing increasing latency when fetching chunks as my dataset grows.
I'm querying the
document_embeddings
document_embeddings
table (with ~30k rows currently) using:
```sql SELECT 1 - (embedding <#> $1) AS similarity, content FROM document_embeddings ORDER BY embedding <#> $1 LIMIT 15;
I also created an HNSW index: CREATE INDEX ON document_embeddings USING hnsw (embedding vector_l2_ops);
Even with this index, fetching just 15 results takes ~8 seconds, and it's getting slower as I add more data. I expected sub-200ms latency for this scale.
I'm using supabase free account now. Do you think if I switch to Supabase pro i'll have 300ms for chunks fetching? Also, my total chunks will be 800k (so far i'm just testing with 30k and i can see already very slow comparing to 5k of chunks)
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.