Re: Partitioned TEMP tables

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ed Behn <ed(dot)behn(at)rockwellcollins(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Partitioned TEMP tables
Date: 2017-07-31 22:40:43
Message-ID: 23148.1501540843@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ed Behn <ed(dot)behn(at)rockwellcollins(dot)com> writes:
> I tried that. I didn't seem to help.

Well, it works in a simple test case for me. You'll need to post a
self-contained example that's not working if you want much help ...

regression=# create temp table pp(f1 int, f2 text);
CREATE TABLE
regression=# create temp table c1(check(f1 between 0 and 1)) inherits(pp);
CREATE TABLE
regression=# create temp table c2(check(f1 between 1 and 2)) inherits(pp);
CREATE TABLE
regression=# explain select * from pp where f1 < 1;
QUERY PLAN
------------------------------------------------------------
Append (cost=0.00..25.88 rows=424 width=36)
-> Seq Scan on pp (cost=0.00..0.00 rows=1 width=36)
Filter: (f1 < 1)
-> Seq Scan on c1 (cost=0.00..25.88 rows=423 width=36)
Filter: (f1 < 1)
(5 rows)

regression=# explain select * from pp where f1 > 1;
QUERY PLAN
------------------------------------------------------------
Append (cost=0.00..25.88 rows=424 width=36)
-> Seq Scan on pp (cost=0.00..0.00 rows=1 width=36)
Filter: (f1 > 1)
-> Seq Scan on c2 (cost=0.00..25.88 rows=423 width=36)
Filter: (f1 > 1)
(5 rows)

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Daniel Franco 2017-07-31 22:52:28 PostgreSQL and Data Warehouse optimizations
Previous Message Scott Marlowe 2017-07-31 21:55:14 Re: Manage slot in logical/pglogical replication