Skip to content
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

perf: make the Null Filtering query more performant #3009

Closed
wants to merge 1 commit into from

Conversation

laurenceisla
Copy link
Member

@laurenceisla laurenceisla commented Oct 14, 2023

Closes #2961

  • Convert 'table is distinct from null' to 'join_col is not null'
  • Adapt subquery to new filter
  • Verify if it can only be done for to-one relationships

-- https://github.com/PostgREST/postgrest/issues/2800#issuecomment-1720315818
-- "?table=not.is.null" translates to:
-- * "table.join_column IS NOT NULL" for to-one relationships
-- * "table IS NOT NULL" for to-many relationships
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The query for "to-many" rels forces me to use a GROUP BY, the original related issue also happened for these cases only. If no better query exists then it will be left as table IS NOT NULL or table IS DISTINCT FROM NULL.

@laurenceisla
Copy link
Member Author

I'm failing to make a clean implementation for this. I'll close this PR for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Make the Null Filtering query more performant
1 participant