Re: Views With Unions - Mailing list pgsql-performance

From Stephan Szabo
Subject Re: Views With Unions
Date
Msg-id 20030731152719.V26943-100000@megazone.bigpanda.com
Whole thread Raw
In response to Views With Unions  (Christopher Browne <cbbrowne@libertyrms.info>)
Responses Re: Views With Unions  (Rajesh Kumar Mallah <mallah@trade-india.com>)
Re: Views With Unions  ("Christopher Browne" <cbbrowne@libertyrms.info>)
List pgsql-performance
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).



pgsql-performance by date:

Previous
From: Christopher Browne
Date:
Subject: Views With Unions
Next
From: "Jim C. Nasby"
Date:
Subject: Re: Odd explain estimate