X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id BBDCCD1C92A for ; Fri, 1 Aug 2003 03:40:34 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 03413-10 for ; Fri, 1 Aug 2003 00:39:27 -0300 (ADT) Received: from trade-india.com (ns5.trade-india.com [66.234.10.13]) by svr1.postgresql.org (Postfix) with SMTP id 96729D1C921 for ; Fri, 1 Aug 2003 00:40:27 -0300 (ADT) Received: (qmail 16343 invoked by uid 0); 1 Aug 2003 03:39:50 -0000 Received: from mallah@trade-india.com by ns5.trade-india.com by uid 502 with qmail-scanner-1.15 (uvscan: v4.1.60/v4171. Clear:. Processed in 1.427526 secs); 01 Aug 2003 03:39:50 -0000 Received: from unknown (HELO trade-india.com) (203.145.130.142) by ns5.trade-india.com with SMTP; 1 Aug 2003 03:39:49 -0000 Message-ID: <3F29E12F.7030207@trade-india.com> Date: Fri, 01 Aug 2003 09:10:31 +0530 From: Rajesh Kumar Mallah User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030701 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Stephan Szabo Cc: Christopher Browne , pgsql-performance@postgresql.org Subject: Re: Views With Unions References: <20030731152719.V26943-100000@megazone.bigpanda.com> In-Reply-To: <20030731152719.V26943-100000@megazone.bigpanda.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/1 X-Sequence-Number: 2818 Stephan Szabo wrote: >On Thu, 31 Jul 2003, Christopher Browne wrote: > > > >> select * from log_table where request_time between 'june 11 2003' and >> 'june 12 2003'; >> >>returns a plan: >>Subquery Scan log_table (cost=0.00..10950.26 rows=177126 width=314) >> -> Append (cost=0.00..10950.26 rows=177126 width=314) >> -> Subquery Scan *SELECT* 1 (cost=0.00..3089.07 rows=50307 width=71) >> -> Seq Scan on log_table_1 (cost=0.00..3089.07 rows=50307 width=71) >> -> Subquery Scan *SELECT* 2 (cost=0.00..602.92 rows=9892 width=314) >> -> Seq Scan on log_table_2 (cost=0.00..602.92 rows=9892 width=314) >> -> Subquery Scan *SELECT* 3 (cost=0.00..2390.09 rows=39209 width=314) >> -> Seq Scan on log_table_3 (cost=0.00..2390.09 rows=39209 width=314) >> >> > >What version are you using? In 7.3 and up it should be willing to >consider moving the clause down, unless there's something like a type >mismatch (because in that case it may not be equivalent without a bunch >more work on the clause). > Dear Chris, I had the same problem(type mismatch) and it was solved finally. check the list "factoring problem ... " subject only 2 weeks back . regds mallah. > > > >---------------------------(end of broadcast)--------------------------- >TIP 9: the planner will ignore your desire to choose an index scan if your > joining column's datatypes do not match > >