Skip to content

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

@gburgett

Description

@gburgett

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions