Re: statistics about tamp tables ... - Mailing list pgsql-hackers

From Hans-Jürgen Schönig
Subject Re: statistics about tamp tables ...
Date
Msg-id 3FC4D614.7050307@cybertec.at
Whole thread Raw
In response to Re: statistics about tamp tables ...  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: statistics about tamp tables ...  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
List pgsql-hackers
Tom Lane wrote:
> Hans-Jürgen Schönig <postgres@cybertec.at> writes:
> 
>>Recently I have come across a simple issue which made me think about it.
>>When we create a tmp table (SELECT INTO, CREATE TABLE AS) the planner 
>>won't know anything about its content after creating it.
> 
> 
> Run ANALYZE on the temp table, if you intend to use it enough to justify
> gathering stats about it.  VACUUM is more work than needed.
> 
>             regards, tom lane

Of course, VACUUM is on overkill (there is no use to shrink something 
minimal ;) ).
The reason why I came up with this posting is slightly different: Assume 
a JDBC application which works with PostgreSQL + some other database. If 
you want to use both databases without PostgreSQL being unnecessarily 
slow an implicit mechanism would be better. Because otherwise you will 
have an SQL command in there which is off standard - putting a switch 
into the application seems to be a fairly ugly solution.
regards,
    Hans

-- 
Cybertec Geschwinde u Schoenig
Ludo-Hartmannplatz 1/14, A-1160 Vienna, Austria
Tel: +43/2952/30706 or +43/660/816 40 77
www.cybertec.at, www.postgresql.at, kernel.cybertec.at




pgsql-hackers by date:

Previous
From: Randolf Richardson
Date:
Subject: Re: Copyright (C) 1996-2002
Next
From: "Yurgis Baykshtis"
Date:
Subject: Re: PANIC: rename from /data/pg_xlog/0000002200000009