Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id E5714476F83 for ; Wed, 22 Jan 2003 11:21:16 -0500 (EST) Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (Postfix) with ESMTP id 39AE347678E for ; Wed, 22 Jan 2003 11:10:00 -0500 (EST) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id C4225D610; Wed, 22 Jan 2003 08:10:04 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id B9DCC5C03; Wed, 22 Jan 2003 08:10:04 -0800 (PST) Date: Wed, 22 Jan 2003 08:10:04 -0800 (PST) From: Stephan Szabo To: Ries van Twisk Cc: Subject: Re: To use a VIEW or not to use a View..... In-Reply-To: <002001c2c228$bc3d2780$f100000a@IT001> Message-ID: <20030122080733.Y96911-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/338 X-Sequence-Number: 11203 On Wed, 22 Jan 2003, Ries van Twisk wrote: > Dear PostgreSQL users, > > I have a view and a table, > > I understand that when a frontend accesses a VIEW that PostgreSQL cannot use > a index on that view. > For example when I do this: SELECT * FROM full_cablelist WHERE > projectocode=5; Correct? In general, no. There are some exceptions, for example views using EXCEPT I believe will not push conditions down. In 7.2.x, views using any of the set ops (INTERSECT, UNION, EXCEPT) wouldn't push conditions down. There are a few other such conditions, but for your view, I think this isn't going to be an issue.