Giter Site home page Giter Site logo

Comments (6)

omid avatar omid commented on May 30, 2024 1

JSONB is quite fast.
For key/value scenario, a simple GIN index is enough.

Based on this link, this index is enough:
CREATE INDEX myindex ON mytable USING GIN (mycolumn jsonb_path_ops)
or to stand in a more safe side, we can use:
CREATE INDEX myindex ON mytable USING GIN (mycolumn)

And we can query like this:
SELECT * FROM mytable WHERE mycolumn @> '{"key": "value"}'

from nettu-scheduler.

fmeringdal avatar fmeringdal commented on May 30, 2024 1

Nice, then I think that is what we should go for!
I can change it within this week if you have not already started on this :)

from nettu-scheduler.

omid avatar omid commented on May 30, 2024 1

Then I'll do it :) I'm in the middle of it :P

from nettu-scheduler.

fmeringdal avatar fmeringdal commented on May 30, 2024 1

I invited you as a collaborator on the project now, then you should have more access :)

from nettu-scheduler.

fmeringdal avatar fmeringdal commented on May 30, 2024

Yeah, I though I had documented somewhere that metadata keys cannot contain _, but apparently not. Another alternative is to have a more unusual separator, and reject metadata keys that contain that separator.
Your solution should probably work as well, what kind of index should then be used for querying on JSONB?

from nettu-scheduler.

omid avatar omid commented on May 30, 2024

seems like I cannot assign issues to myself, you can assign this one to me

from nettu-scheduler.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.