Thanks for the great resources on this site! I am using the new JSONB type in PostgreSQL 9.4 and have a question about indexing. Here is my scenario. Assume I have a table named "user" with two columns: (1) "id" that is of type TEXT and is also the primary key, and (2) "setting" that is of type JSONB and contains the bulk of the payload for each row (as a JSON object). Here is my query pattern:
Notes about the query:
In this case, how should I index the "user" table to get good query performance? Thanks, Pai-Hung asked Apr 19 '15 at 20:10 Lamplighter |
What have you tried already? How did it perform? What would you consider "good query performance"?
By "good performance," I actually meant the optimal indexing strategy given the specific query pattern I showed, so the query can be executed as fast as it can be.