From a7c49d82834b675b92d5266f6e9ac9009df3d70c Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Tue, 1 Jul 2025 11:13:29 -0700 Subject: [PATCH] Updated readme [skip ci] --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index ab8a06d..43c0430 100644 --- a/README.md +++ b/README.md @@ -495,6 +495,8 @@ WITH relaxed_results AS MATERIALIZED ( ) SELECT * FROM relaxed_results ORDER BY distance + 0; ``` +Note: `+ 0` is needed for Postgres 17+ + For queries that filter by distance, use a materialized CTE and place the distance filter outside of it for best performance (due to the [current behavior](https://www.postgresql.org/message-id/flat/CAOdR5yGUoMQ6j7M5hNUXrySzaqZVGf_Ne%2B8fwZMRKTFxU1nbJg%40mail.gmail.com) of the Postgres executor) ```sql