X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 07578D1B189 for ; Tue, 8 Jun 2004 11:33:34 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 87064-06 for ; Tue, 8 Jun 2004 14:33:33 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id DF7A0D1B1CA for ; Tue, 8 Jun 2004 11:33:28 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i58EXVwi001316; Tue, 8 Jun 2004 10:33:31 -0400 (EDT) To: Manfred Koizar Cc: Russell Smith , pgsql-performance@postgresql.org Subject: Re: Use of Functional Indexs and Planner estimates In-reply-to: <6kvac0hridvjffsnf527tk0gh7qu58cac4@email.aon.at> References: <200406081724.36617.mr-russ@pws.com.au> <6kvac0hridvjffsnf527tk0gh7qu58cac4@email.aon.at> Comments: In-reply-to Manfred Koizar message dated "Tue, 08 Jun 2004 10:57:49 +0200" Date: Tue, 08 Jun 2004 10:33:30 -0400 Message-ID: <1315.1086705210@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/88 X-Sequence-Number: 7146 Manfred Koizar writes: > So statistics gathering for expressional indexes will be in 7.5, but I > don't know about the state of the planner ... Planner support is there too: 2004-02-16 19:52 tgl * src/: backend/optimizer/path/costsize.c, backend/optimizer/util/relnode.c, backend/utils/adt/selfuncs.c, include/optimizer/pathnode.h, include/utils/selfuncs.h: Make use of statistics on index expressions. There are still some corner cases that could stand improvement, but it does all the basic stuff. A byproduct is that the selectivity routines are no longer constrained to working on simple Vars; we might in future be able to improve the behavior for subexpressions that don't match indexes. I don't recall anymore what "corner cases" I had in mind for future improvement. regards, tom lane