pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
From: mahdimanesh (@mahdimanesh) <noreply+mahdimanesh@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #816: 90GB sized HSNW index not used
Date: Tue, 08 Apr 2025 08:03:17 +0000
Message-ID: <gh-pgvector-pgvector-816-c2785583958@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-816@github.com>
References: <gh-pgvector-pgvector-816@github.com>

So you mean my query like this is incorrect:

`SELECT *
FROM langchain_pg_embedding
WHERE collection_id = 'my-uuid'
ORDER BY embedding <=> '[my-vector]'
LIMIT 4;`

And I should try...

`SELECT *
FROM langchain_pg_embedding
WHERE collection_id = 'my-uuid'
ORDER BY embedding::vector(1024) <=> '[my-vector]'. -- Explicit typecast?!
LIMIT 4;`

=> Tested and it works! Many thx, @ankane! Saved my day. :-)

view thread (7+ messages)

Message-ID: <gh-pgvector-pgvector-816-c2785583958@github.com>
Permalink:  ../gh-pgvector-pgvector-816-c2785583958@github.com/

 · 


This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox