-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make the Null Filtering query more performant #2961
Comments
Some examples. I'm adding this to my INSERT INTO test.clients (id, name) SELECT n+2, 'Test ' || n FROM generate_series(1,1000) AS n;
INSERT INTO test.projects (id, name, client_id) SELECT (n-1)*100+m+5, 'Test ' || m, n+2 FROM generate_series(1,1000) AS n, LATERAL generate_series(1,100) AS m;
CREATE INDEX projects_client_id ON projects (client_id); Not a lot of data, but it shows.
|
After the discussion that started in
#2951 (comment), the conclusion is that changing
table IS DISTINCT FROM NULL
totable.join_column IS NOT NULL
should be more performant because PostgreSQL would treat that last one as an INNER JOIN.Perhaps we need to change how we build the embedding sub queries to allow this. The
IS DISTINCT FROM
is specified here:postgrest/src/PostgREST/Query/SqlFragment.hs
Line 340 in add4dfe
The text was updated successfully, but these errors were encountered: