Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 4A69A2E00A0 for ; Mon, 28 Jan 2008 13:20:30 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 16507-05 for ; Mon, 28 Jan 2008 13:20:18 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 704FD2E0075 for ; Mon, 28 Jan 2008 13:20:24 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m0SHK6FE003742; Mon, 28 Jan 2008 12:20:06 -0500 (EST) To: Andreas Joseph Krogh cc: pgsql-sql@postgresql.org, "Premsun Choltanwanich" Subject: Re: Slow Query problem In-reply-to: <200801281326.33832.andreak@officenet.no> References: <479DE418.C5F7.004C.0@nsasia.co.th> <200801281326.33832.andreak@officenet.no> Comments: In-reply-to Andreas Joseph Krogh message dated "Mon, 28 Jan 2008 13:26:33 +0100" Date: Mon, 28 Jan 2008 12:20:06 -0500 Message-ID: <3741.1201540806@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/216 X-Sequence-Number: 30069 Andreas Joseph Krogh writes: > On Monday 28 January 2008 08:18:24 Premsun Choltanwanich wrote: >> I am currently using PostgreSQL database version 8.0.13. My problem >> relates to a slow result when a query using a defined view joins to another >> table for a result. > It is very hard to help without you providing the schema for the tables/views > involved. One suggestion is that 8.2.x is significantly smarter about joins to unions than previous releases were. Whether this would help in your particular case is impossible to say, though, without more detail. regards, tom lane