| From: | Filip Rembiałkowski <plk(dot)zuber(at)gmail(dot)com> | 
|---|---|
| To: | "ABHANG RANE" <arane(at)indiana(dot)edu> | 
| Cc: | pgsql-general(at)postgresql(dot)org | 
| Subject: | Re: cube operations | 
| Date: | 2007-05-16 21:45:25 | 
| Message-ID: | 92869e660705161445x2b665fb9qc2e10da277d2c1ef@mail.gmail.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
2007/5/16, ABHANG RANE <arane(at)indiana(dot)edu>:
> Hi,
> I have a array column which has 12 real values in it. Basically these
> values represent co-ordinates in 12 dimensions for a substance. My main
> need is to find substances similar to a particular compound. Now I can
> do by calculating differences with each array in the whole table. But
> the table has millions of rows. So I need some kinda higher dimensional
> index. I have read about the cube operation in postgre, can it be
> extended to 12 dimensions or something like that.
Don't know if this helps, but have a look at intarray:
http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/intarray/
If you feel brave you could take this code and try to write some
proximity- or similarity-checking functions in C to speedup the
calculations.
Also consider representing values by integers, since integer
operations are much faster.
-- 
Filip Rembiałkowski
| From | Date | Subject | |
|---|---|---|---|
| Next Message | woodb | 2007-05-16 21:53:17 | Re: basic postgres questions... | 
| Previous Message | Rich Shepard | 2007-05-16 21:36:47 | Re: Postgres Printed Manuals |