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

GIN (Generalized Inverted Index) indexes on JSONB columns for queries #402

Open
hamidahoderinwale opened this issue Feb 13, 2025 · 0 comments · May be fixed by #413
Open

GIN (Generalized Inverted Index) indexes on JSONB columns for queries #402

hamidahoderinwale opened this issue Feb 13, 2025 · 0 comments · May be fixed by #413
Assignees
Labels
backend Backend, including web server and database core Rust core for categorical logic and general computation

Comments

@hamidahoderinwale
Copy link
Collaborator

hamidahoderinwale commented Feb 13, 2025

GIN (Generalized Inverted Index) indexes can efficiently handle both JSONB data types and full-text search. Key features are as follows:

  • Supports LIKE searches and operates using key-value pair queries
  • Works with JSONB to enable flexible, updateable schemas - tables can change structure while maintaining queryability
  • Can be combined with B-Tree indexes for hybrid querying capabilities

We will use one multi-column GIN index rather than multiple separate indexes. One reason why is that when updating data (e.g, adding columns and rows), PostgreSQL only needs to update one index.

Relevant reference: https://anyblockers.com/posts/postgres-as-a-search-engine

@hamidahoderinwale hamidahoderinwale self-assigned this Feb 13, 2025
@hamidahoderinwale hamidahoderinwale added backend Backend, including web server and database core Rust core for categorical logic and general computation labels Feb 13, 2025
@hamidahoderinwale hamidahoderinwale linked a pull request Feb 16, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Backend, including web server and database core Rust core for categorical logic and general computation
Projects
Development

Successfully merging a pull request may close this issue.

1 participant