Search Postgresql Archives

Re: JSON vs Text + Regexp Index Searching

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 25, 2014 at 9:08 AM, Eliot Gable
<egable+pgsql-general@xxxxxxxxx> wrote:
> If we wanted to put an index on a JSON data type column whose values was a
> simple array of IDs, what would the index look like, and how would we
> construct the query to make use of it?

For 9.0, your only option would be to use the intarray extension.  If
your IDs are all integers, this may even be your best option.  9.4
hstore may get the ability to support similar operations in a more
general way.  json type may be able to optimize this case in the
future (probably as jsonb), but as of 9.4 it can't.

merlin


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux