Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 6462763221B for ; Fri, 27 Nov 2009 11:38:24 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 77493-03 for ; Fri, 27 Nov 2009 15:38:16 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id A1F5C631873 for ; Fri, 27 Nov 2009 11:38:16 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id nARFcEra027611; Fri, 27 Nov 2009 10:38:14 -0500 (EST) To: Teodor Sigaev cc: Pgsql Hackers Subject: Re: KNNGiST for knn-search (WIP) In-reply-to: <4B0FEF06.5050703@sigaev.ru> References: <4B0AC9E1.5050509@sigaev.ru> <4B0EAE0D.606@sigaev.ru> <4B0FEF06.5050703@sigaev.ru> Comments: In-reply-to Teodor Sigaev message dated "Fri, 27 Nov 2009 18:23:50 +0300" Date: Fri, 27 Nov 2009 10:38:14 -0500 Message-ID: <27610.1259336294@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.11 tagged_above=-10 required=5 tests=BAYES_05=-1.11 X-Spam-Level: X-Archive-Number: 200911/1837 X-Sequence-Number: 150536 Teodor Sigaev writes: >> Planner (find_usable_indexes function, actually) could push pathkey >> expression into restriction clauses of index. I'm not fully satisfied >> with this piece of code, but, may be, someone has a better idea. I >> though about adding separate indexorderquals in IndexPath structure... > Done, IndexScan and IndexPath have separate field to store order clauses. Why? Isn't that redundant with the pathkey structures? We generate enough paths during a complex planning problem that I'm not in favor of adding unnecessary structures to them. regards, tom lane