Re: index structure for 114-dimension vector

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Lazarus <andrew(at)pillette(dot)com>
Cc: Mark Kirkwood <markir(at)paradise(dot)net(dot)nz>, pgsql-performance(at)postgresql(dot)org
Subject: Re: index structure for 114-dimension vector
Date: 2007-04-21 00:44:31
Message-ID: 3357.1177116271@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Andrew Lazarus <andrew(at)pillette(dot)com> writes:
> Because I know the 25 closest are going to be fairly close in each
> coordinate, I did try a multicolumn index on the last 6 columns and
> used a +/- 0.1 or 0.2 tolerance on each. (The 25 best are very probably inside
> that hypercube on the distribution of data in question.)

> This hypercube tended to have 10-20K records, and took at least 4
> seconds to retrieve. I was a little surprised by how long that took.
> So I'm wondering if my data representation is off the wall.

A multicolumn btree index isn't going to be helpful at all. Jeff's idea
of using six single-column indexes with the above query might work,
though.

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Colin McGuigan 2007-04-21 05:58:07 Odd problem with planner choosing seq scan
Previous Message Mark Kirkwood 2007-04-21 00:42:35 Re: index structure for 114-dimension vector