Re: autovacuum and temp tables support

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: autovacuum and temp tables support
Date: 2010-04-08 19:22:08
Message-ID: Pine.LNX.4.64.1004082317300.8023@sn.sai.msu.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 8 Apr 2010, Robert Haas wrote:

> On Thu, Apr 8, 2010 at 2:53 PM, Alvaro Herrera
> <alvherre(at)commandprompt(dot)com> wrote:
>> Oleg Bartunov wrote:
>>
>>> our client complained about slow query, which involves temporary tables.
>>> Analyzing them manually solved the problem. I don't remember
>>> arguments against temporary tables support by autovacuum. I'd
>>> appreciate any
>>> pointers.
>>
>> Autovacuum can't process temp tables; they could reside in a backend's
>> private temp buffers (local memory, not shared).
>
> On general thought I've had is that it would be nice if the first
> attempt to SELECT against a table with no statistics would trigger an
> automatic ANALYZE by the backend on which the query was executed.
> It's pretty common to populate a table using INSERT, or CTAS, or COPY
> and then try to immediately run a query against it, and I've often
> found that it's necessary to insert manual analyze statements in there
> to get decent query plans.

Oracle does this. So, is't worth to add support (configurable, like
Oracle's optimizer_dynamic_sampling) ?

Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-04-08 19:40:35 Re: autovacuum and temp tables support
Previous Message Jaime Casanova 2010-04-08 19:16:20 Re: A maze of twisty mailing lists all the same