Re: indexing array columns - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: indexing array columns
Date
Msg-id 20070414161913.GB3608@svana.org
Whole thread Raw
In response to indexing array columns  (Rajarshi Guha <rguha@indiana.edu>)
Responses Re: indexing array columns  (Teodor Sigaev <teodor@sigaev.ru>)
List 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@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: error creating/setting sequence, pg_dump / pg_restore 8.1.5
Next
From: "Anton Melser"
Date:
Subject: Re: recommendations for reducing mem usage on local dev machine