Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 021AF9FB508 for ; Fri, 30 Mar 2007 13:14:32 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 99539-01-9 for ; Fri, 30 Mar 2007 13:14:26 -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 2B7E49FB4FB for ; Fri, 30 Mar 2007 13:14:26 -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 l2UGEMHA020419; Fri, 30 Mar 2007 12:14:22 -0400 (EDT) To: Rickard =?iso-8859-1?b?U2r2c3Ry9m0=?= cc: pgsql-admin@postgresql.org Subject: Re: Performance on views In-reply-to: <1175253570.460cf2427984c@mail.bluebottle.com> References: <1175253570.460cf2427984c@mail.bluebottle.com> Comments: In-reply-to Rickard =?iso-8859-1?b?U2r2c3Ry9m0=?= message dated "Fri, 30 Mar 2007 04:19:30 -0700" Date: Fri, 30 Mar 2007 12:14:22 -0400 Message-ID: <20418.1175271262@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/237 X-Sequence-Number: 25061 Rickard =?iso-8859-1?b?U2r2c3Ry9m0=?= writes: > I have a view that is really slow and I ca easily work around the slowness by bypassing the view and query the real table directly. Let's see the exact definition of the view and EXPLAIN ANALYZE results for doing it both ways. Also, what PG version is this? regards, tom lane