From: jkatz (@jkatz) <noreply+jkatz@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #719: SELECT WHERE ORDER BY LIMIT no results
Date: Sat, 08 Feb 2025 20:59:49 +0000
Message-ID: <gh-pgvector-pgvector-719-c2645939256@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-719@github.com>
References: <gh-pgvector-pgvector-719@github.com>
> So, I have been able to test these settings locally. I currently have a table with vector and sparse embeddings of more than 40k records. As pointed out earlier, I was doing JSONB filtering and currently using v0.8.0.
>
> After extensive testing, I was able to single out the `iterative_scan` as the most meaningful setting. When is on `strict_order`, the query still takes more than 10 secs for its execution. When using `relaxed_order` I see huge reduction in execution time, down to 600ms.
>
> This is inline with the contents of your presentation [@jkatz](https://github.com/jkatz) , but I need to point out, despite using BTREE and GIN indexes on my metadata, and other filtering attributes, the performance remains poor, unless the `iterative_scan` changes ,and I use the HNSW indexes
@Tibiritabara Thanks for testing, however, I'm not fully following the explanation. Do you only have 40K records total that you're searching over in the dataset? Additionally, it'd be helpful to see the query / indexes you've created / EXPLAIN plans. FWIW, in a lot of my tests, I didn't see a performance difference between strict/relaxed ordering, so I wonder if something else is happening.