Re: Index using in jsonb query

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Index using in jsonb query
Date: 2017-03-12 01:20:40
Message-ID: b26691d5-73e8-24d0-ece9-6fe27b48696a@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 3/11/2017 3:55 PM, SuperCiccio wrote:
> Is there a way to make the following query use some sort of indexing?
>
> select field1,field2 from datatable where
> (jsonfield#>>'{path1,path2}')::numeric < 1000;

if the '{path1,path2}' part is constant, I'd think you could create an
index on (jsonfield #>> '{path1,path2}')::numeric

--
john r pierce, recycling bits in santa cruz

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message vod vos 2017-03-12 06:14:53 How to define the limit length for numeric type?
Previous Message SuperCiccio 2017-03-11 23:55:43 Index using in jsonb query