X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id F047FDB706 for ; Tue, 1 Nov 2005 19:28:44 -0400 (AST) 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 34047-02 for ; Tue, 1 Nov 2005 23:28:42 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id A46E2DB724 for ; Tue, 1 Nov 2005 19:28:43 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id jA1NSiWh029381; Tue, 1 Nov 2005 18:28:44 -0500 (EST) To: Mitch Pirtle Cc: "pgsql-performance@postgresql.org" Subject: Re: Joining views disables indexes? In-reply-to: <330532b60511011516u3709d826w391a4ac167c6967b@mail.gmail.com> References: <330532b60511011516u3709d826w391a4ac167c6967b@mail.gmail.com> Comments: In-reply-to Mitch Pirtle message dated "Tue, 01 Nov 2005 18:16:59 -0500" Date: Tue, 01 Nov 2005 18:28:44 -0500 Message-ID: <29380.1130887724@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.006 required=5 tests=[AWL=0.006] X-Spam-Score: 0.006 X-Spam-Level: X-Archive-Number: 200511/20 X-Sequence-Number: 15277 Mitch Pirtle writes: > I have a client that is testing an internal data platform, and they > were happy with PostgreSQL until they tried to join views - at that > time they discovered PostgreSQL was not using the indexes, and the > queries took 24 hours to execute as a result. You'll need to provide some actual details if you want useful comments. Let's see the table schemas, the view definitions, and the EXPLAIN plan (I'll spare you a request for EXPLAIN ANALYZE given that it'd take 24 hours to get ;-) ... although some estimate of the number of rows expected would be helpful). And I trust they remembered to ANALYZE the underlying tables first? Also, which PG version exactly? regards, tom lane