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

Postgres store: Use array operators instead of ANY() on links #214

Open
gburgett opened this issue Feb 25, 2020 · 0 comments
Open

Postgres store: Use array operators instead of ANY() on links #214

gburgett opened this issue Feb 25, 2020 · 0 comments

Comments

@gburgett
Copy link
Member

Joining entries using the ANY(t.links) column actually makes it impossible to use an index to do that join, as explained in this Stack Overflow:
https://stackoverflow.com/a/29245753/2192243

Instead of using ANY, we need to use the Array Contains operator @> and then apply a GIN index to the links column:

CREATE INDEX IF NOT EXISTS contentful_raw_links ON contentful_raw USING GIN (links array_ops);
@gburgett gburgett added the core label Apr 16, 2021
@zube zube bot removed the core label Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant