X-Original-To: pgsql-sql@postgresql.org Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id E7611475C15 for ; Mon, 10 Mar 2003 10:14:25 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.8/8.12.8) with ESMTP id h2AFERub017356; Mon, 10 Mar 2003 10:14:27 -0500 (EST) To: "Victor Yegorov" Cc: "PostgreSQL SQL List" Subject: Re: Optimizing view In-reply-to: <20030310135231.GA3791@pirmabanka.lv> References: <20030310135231.GA3791@pirmabanka.lv> Comments: In-reply-to "Victor Yegorov" message dated "Mon, 10 Mar 2003 15:52:31 +0200" Date: Mon, 10 Mar 2003 10:14:27 -0500 Message-ID: <17355.1047309267@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200303/243 X-Sequence-Number: 12283 "Victor Yegorov" writes: > I'm running `PostgreSQL 7.2 on i586-pc-linux-gnu, compiled by GCC 2.95.3' > and have some problems with queries on a view. Try 7.3. 7.2 won't push down WHERE conditions into a union. BTW, if the archive table is disjoint from the main table, you'd be better off using UNION ALL instead of UNION. regards, tom lane