Re: [GENERAL] ORDER BY for jsonb

2015-04-19 Thread Pai-Hung Chen
​Thanks for the insight. Pai-Hung

Re: [GENERAL] ORDER BY for jsonb

2015-04-18 Thread Jim Nasby
On 4/18/15 1:30 AM, Pai-Hung Chen wrote: Thanks for the help. So in this case, the performance of ORDER BY will not be affected at all by whether an index is created on the jsonb "setting" field? No. The optimizer is going to first try and satisfy the WHERE clause with that relevant index. Bec

Re: [GENERAL] ORDER BY for jsonb

2015-04-17 Thread Pai-Hung Chen
"pgsql-general@postgresql.org" Subject: Re: [GENERAL] ORDER BY for jsonb On 4/17/15 9:53 PM, Pai-Hung Chen wrote: > Hi, > > I am new to PostgreSQL and have a question about the new jsonb type in > 9.4. Suppose I have a table called "user" that has two columns: (1) &g

Re: [GENERAL] ORDER BY for jsonb

2015-04-17 Thread Jim Nasby
On 4/17/15 9:53 PM, Pai-Hung Chen wrote: Hi, I am new to PostgreSQL and have a question about the new jsonb type in 9.4. Suppose I have a table called "user" that has two columns: (1) "user_id" of type text, also the primary key, (2) "setting" of type jsonb. With the following query pattern: SE

[GENERAL] ORDER BY for jsonb

2015-04-17 Thread Pai-Hung Chen
Hi, I am new to PostgreSQL and have a question about the new jsonb type in 9.4. Suppose I have a table called "user" that has two columns: (1) "user_id" of type text, also the primary key, (2) "setting" of type jsonb. With the following query pattern: SELECT * FROM user WHERE user_id IN [...] ORD