Re: Can you spot the difference?

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: Moshe Jacobson <moshe(at)neadwerx(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Can you spot the difference?
Date: 2013-04-17 15:32:08
Message-ID: 516EC078.9080302@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 04/17/2013 07:49 AM, Moshe Jacobson wrote:
>
> On Tue, Apr 16, 2013 at 7:29 PM, Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com
> <mailto:adrian(dot)klaver(at)gmail(dot)com>> wrote:
>
> "
> The autovacuum daemon, if enabled, will automatically issue ANALYZE
> commands whenever the content of a table has changed sufficiently.
> However, administrators might prefer to rely on manually-scheduled
> ANALYZE operations, particularly if it is known that update activity
> on a table will not affect the statistics of "interesting" columns.
> The daemon schedules ANALYZE strictly as a function of the number of
> rows inserted or updated; it has no knowledge of whether that will
> lead to meaningful statistical changes.
> "
>
> So at a guess there has not been enough churn on the table.
>
>
> So pg_restore's COPY would not trigger the ANALYZE? That seems wrong.

Well the argument most often heard is that the command has a cost and it
left to the discretion of the user as to when to incur that cost. For
instance I, and others, often use COPY to transfer data from some
external data source to a holding table, from which the data is then
manipulated/transferred to one or more tables. I have not interest in
having the holding table ANALYZEd as I am going to hit all the rows
anyway. Generally what people do in your situation is include a manual
ANALYZE in a script that is part of or follows the COPY.

>
>
> --
> Moshe Jacobson
> Nead Werx, Inc. | Manager of Systems Engineering
> 2323 Cumberland Parkway, Suite 201 | Atlanta, GA 30339
> moshe(at)neadwerx(dot)com <mailto:moshe(at)neadwerx(dot)com> | www.neadwerx.com
> <http://www.neadwerx.com/>
>
> "Quality is not an act, it is a habit." -- Aristotle

--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message itishree sukla 2013-04-17 16:01:31 SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object
Previous Message Dale Fukami 2013-04-17 14:53:44 Re: Mysterious table that exists but doesn't exist