Andrew Lazarus <andrew@pillette.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