Re: question about hstore and indexes

From: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: question about hstore and indexes
Date: 2013-09-27 08:35:43
Message-ID: 20130927083543.GA11397@tux
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Matteo Beccati <php(at)beccati(dot)com> wrote:

> Hi Andreas,
>
> On 27/09/2013 09:24, Andreas Kretschmer wrote:
> > This query can't use the index:
> >
> > test=*# explain select * from my_hstore where werte->'key1' = 'val1';
> > QUERY PLAN
> > ------------------------------------------------------------------------------
> > Seq Scan on my_hstore (cost=10000000000.00..10000000001.06 rows=1 width=36)
> > Filter: ((werte -> 'key1'::text) = 'val1'::text)
> > (2 rows)
>
> According to the docs:
>
> hstore has GiST and GIN index support for the @>, ?, ?& and ?| operators
>
> http://www.postgresql.org/docs/9.3/static/hstore.html

Ahh yes, there is no support for =, i understand.

Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknown)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Arjen Nienhuis 2013-09-27 08:37:26 Re: ENUM drop label workaround
Previous Message Matteo Beccati 2013-09-27 07:41:03 Re: question about hstore and indexes