Re: indexing array columns

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Rajarshi Guha <rguha(at)indiana(dot)edu>
Cc: pgsql general <pgsql-general(at)postgresql(dot)org>
Subject: Re: indexing array columns
Date: 2007-04-14 16:19:13
Message-ID: 20070414161913.GB3608@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Apr 13, 2007 at 06:09:50PM -0400, Rajarshi Guha wrote:
> Hi, I have a table of about 10M rows. It has two columns A and B, where
> A is a text field and B is a real[12] field.
>
> Now when this table is queried it is usually of the form:
>
> select A from theTable where sim(B, C) > 0.8

<snip>

> What type of indexing, available in Postgres could be used for my
> problem? Would it require me to implement my own indexing scheme?

PostgreSQL provides very flexible indexing mechanisms. By using GiST
you should be able to index the way you want. In contrib there a module
"cube" which does similar to what you want to 3D, extending it to 12D
shouldn't be too hard...

Have a nice day,

--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-04-14 16:19:35 Re: error creating/setting sequence, pg_dump / pg_restore 8.1.5
Previous Message Alain Roger 2007-04-14 16:11:05 postgresql 8.1.4 to 8.2.3