Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 35C2C9FB9EB for ; Fri, 20 Apr 2007 21:44:41 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 35825-06 for ; Fri, 20 Apr 2007 21:44:33 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 654F79FB89C for ; Fri, 20 Apr 2007 21:44:38 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id l3L0iV4X003358; Fri, 20 Apr 2007 20:44:31 -0400 (EDT) To: Andrew Lazarus cc: Mark Kirkwood , pgsql-performance@postgresql.org Subject: Re: index structure for 114-dimension vector In-reply-to: <3810566934.20070420172820@pillette.com> References: <01db01c781e4$c700bf30$2e00a8c0@tridecap.com> <1217328326.20070420120729@pillette.com> <1177105284.28383.31.camel@dogma.v10.wvs> <46294FEB.9010909@paradise.net.nz> <3810566934.20070420172820@pillette.com> Comments: In-reply-to Andrew Lazarus message dated "Fri, 20 Apr 2007 17:28:20 -0700" Date: Fri, 20 Apr 2007 20:44:31 -0400 Message-ID: <3357.1177116271@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/355 X-Sequence-Number: 24232 Andrew Lazarus 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