X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0F6F9D1B16D for ; Thu, 10 Jun 2004 11:20:14 -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 45113-07 for ; Thu, 10 Jun 2004 14:20:15 +0000 (GMT) Received: from mail.gmx.net (mail.gmx.de [213.165.64.20]) by svr1.postgresql.org (Postfix) with SMTP id 49C1ED1B192 for ; Thu, 10 Jun 2004 11:20:09 -0300 (ADT) Received: (qmail 30844 invoked by uid 65534); 10 Jun 2004 14:20:13 -0000 Received: from p5087EF58.dip0.t-ipconnect.de (EHLO hermes.hilbert.loc) (80.135.239.88) by mail.gmx.net (mp002) with SMTP; 10 Jun 2004 16:20:13 +0200 X-Authenticated: #1433807 Received: (from ncq@localhost) by hermes.hilbert.loc (8.11.6/8.11.6/SuSE Linux 0.5) id i5AE6Rb05313 for pgsql-sql@postgresql.org; Thu, 10 Jun 2004 16:06:27 +0200 Date: Thu, 10 Jun 2004 16:06:27 +0200 From: Karsten Hilbert To: pgsql-sql@postgresql.org Subject: Re: Find out whether a view's column is indexed? Message-ID: <20040610160627.B1308@hermes.hilbert.loc> References: <37936EEC582B394A9E1AA951991A551604C3C0@dev001_pdc.Dev.cadcorp.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <37936EEC582B394A9E1AA951991A551604C3C0@dev001_pdc.Dev.cadcorp.net> User-Agent: Mutt/1.3.22.1i Re-X-turn-receipt-to: Karsten.Hilbert@gmx.net Di-X-sposition-Notification-To: Karsten.Hilbert@gmx.net X-Confi-X-rm-Reading-To: Karsten.Hilbert@gmx.net X-Pri-X-ority: 2 (High) 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/85 X-Sequence-Number: 18030 > and I can see whether a sequential scan or an index scan is > performed, but parsing the output of EXPLAIN programmatically > is nearly impossible. Anyway the words 'Index Scan' and 'Seq > Scan' can change without notice, maybe even from one locale to > another. I think you are operating under the faulty assumption that 'Index Scan' in EXPLAIN output signifies that a column is *indexed*. What it really tells you is whether an index is actually *used* when getting data from a column. That of course requires an index to be there. However, an index being there doesn't guarantee it being used. Karsten -- GPG key ID E4071346 @ wwwkeys.pgp.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346