Re: index on jsonb col with 2D array inside the json

2019-02-19 Thread Mariel Cherkassky
Thanks for the feedback! On Tue, Feb 19, 2019, 6:42 PM Michael Lewis I would expect that R2 vs R3 would be negligible but perhaps gist works > much better and would be an improvement. When you are down to 7ms already, > I wouldn't hope for any big change. I assume you used btree for the > multi-c

Re: index on jsonb col with 2D array inside the json

2019-02-19 Thread Michael Lewis
I would expect that R2 vs R3 would be negligible but perhaps gist works much better and would be an improvement. When you are down to 7ms already, I wouldn't hope for any big change. I assume you used btree for the multi-column index on R2 range_first, range_last but am not familiar with gist on ra

Re: index on jsonb col with 2D array inside the json

2019-02-19 Thread Mariel Cherkassky
I dont have any indexes on R (the table with the jsonb column). I was asking if I can create any that can increase this query`s performance. If I understood you correctly I have 3 options right now : 1)R, without indexes 2)R2 with an index on first and last 3)R3 that should contain a single range

Re: index on jsonb col with 2D array inside the json

2019-02-19 Thread Michael Lewis
Is your JSON data getting toasted? I wouldn't assume so if it is remaining small but something to check. Regardless, if an index exists and isn't being used, then that would be the primary concern. You didn't share what the definition of the index on R.data is... what do you already have? You have