From: | Mark Kirkwood <markir(at)paradise(dot)net(dot)nz> |
---|---|
To: | Jeff Davis <pgsql(at)j-davis(dot)com> |
Cc: | Andrew Lazarus <andrew(at)pillette(dot)com>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: index structure for 114-dimension vector |
Date: | 2007-04-20 23:42:35 |
Message-ID: | 46294FEB.9010909@paradise.net.nz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Jeff Davis wrote:
> On Fri, 2007-04-20 at 12:07 -0700, Andrew Lazarus wrote:
>> I have a table with 2.5 million real[] arrays. (They are points in a
>> time series.) Given a new array X, I'd like to find, say, the 25
>> closest to X in some sense--for simplification, let's just say in the
>> usual vector norm. Speed is critical here, and everything I have tried
>> has been too slow.
>>
>> I imported the cube contrib package, and I tried creating an index on
>> a cube of the last 6 elements, which are the most important. Then I
>
> Have you tried just making normal indexes on each of the last 6 elements
> and see if postgresql will use a BitmapAnd to combine them?
>
>
I don't think that will work for the vector norm i.e:
|x - y| = sqrt(sum over j ((x[j] - y[j])^2))
Cheers
Mark
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Lazarus | 2007-04-21 00:28:20 | Re: index structure for 114-dimension vector |
Previous Message | Jeff Davis | 2007-04-20 21:41:24 | Re: index structure for 114-dimension vector |