Re: Statistics with temporary tables, optimizer question - Mailing list pgsql-novice

From Tom Lane
Subject Re: Statistics with temporary tables, optimizer question
Date
Msg-id 14846.1285252619@sss.pgh.pa.us
Whole thread Raw
In response to Re: Statistics with temporary tables, optimizer question  (Josh Kupershmidt <schmiddy@gmail.com>)
List pgsql-novice
Josh Kupershmidt <schmiddy@gmail.com> writes:
> On Thu, Sep 23, 2010 at 9:33 AM, Mladen Gogala
> <mladen.gogala@vmsinfo.com> wrote:
>> My question is how does the optimizer calculate stats for the temporary
>> tables? I am probably not expected to do a vacuum analyze on the
>> temporary table, after finishing the inserts? How exactly does the optimizer
>> deal
>> with the temporary tables?

> The advice I've seen says to manually run an ANALYZE on a temporary
> table which you're going to be doing something performance-intensive
> with.

Yeah.  Autovacuum cannot help you with a temp table --- it can't
safely access such a table.  So the stuff that normally goes on
"in the background" has to be done explicitly if you need it done.

            regards, tom lane

pgsql-novice by date:

Previous
From: Josh Kupershmidt
Date:
Subject: Re: Statistics with temporary tables, optimizer question
Next
From: kevin burdish
Date:
Subject: ERROR: invalid input syntax for integer: ""