Re: Query doesn't use index on hstore column

From: Michael Barker <mikeb01(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Query doesn't use index on hstore column
Date: 2014-12-06 00:05:02
Message-ID: CALwNKeT5f6g+R7VNa6wx18CZVUq3c2FmWGQ8hDcq=dt8m1gUSA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

>
> Well, first off, a btree index is fairly useless for this query,
> because btree has no concept that the hstore has any sub-structure.
> A GIN index or GIST index could work though. Secondly, you have to
> remember that indexable WHERE conditions in Postgres are *always* of
> the form "WHERE indexed_column indexable_operator some_comparison_value".
>

And the student was enlightened....

Cheers, seeing sensible explain plans now.

> You might care to read
> http://www.postgresql.org/docs/9.4/static/indexes.html
> to get a better handle on what Postgres indexes can and can't do.
>

Will do, thanks again.

Mike.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Bruce Momjian 2014-12-06 13:08:28 Re: intel s3500 -- hot stuff
Previous Message Simon Riggs 2014-12-05 16:04:59 Re: Yet another abort-early plan disaster on 9.3