From: Merlin Moncure <mmoncure@gmail.com>
To: Carlo Stonebanks <stonec.register@sympatico.ca>
Cc: pgsql-performance@postgresql.org
Subject: Re: Performance Optimization for Dummies 2 - the SQL
Date: Mon, 9 Oct 2006 09:49:46 -0400
Message-ID: <b42b73150610090649y74c4dc99g176366921f784e7b@mail.gmail.com> (raw)
In-Reply-To: <eg6f8l$2det$1@news.hub.org>
References: <eft782$5a1$1@news.hub.org>
<b42b73150610041407y3554f311u1329c4f3bdc53999@mail.gmail.com>
<eg1dai$1tfa$1@news.hub.org>
<b42b73150610042326v7fdeed17rf6b96e52a681a6db@mail.gmail.com>
<eg2cds$29en$1@news.hub.org>
<b42b73150610050630t76e9eedeh45a382729d35f2f6@mail.gmail.com>
<eg611q$l0m$1@news.hub.org>
<1160153623.6181.13.camel@state.g2switchworks.com>
<b42b73150610061153i3d11d7a4r23e1d7c5317feb9f@mail.gmail.com>
<eg6f8l$2det$1@news.hub.org>
On 10/6/06, Carlo Stonebanks <stonec.register@sympatico.ca> wrote:
> > how did you determine that it is done every 500 rows? this is the
>
> The import program pages the import table - it is currently set at 500 rows
> per page. With each page, I run an ANALYZE.
right, i just wanted to make sure of something (you are doing it
properly). really, analyze only needs to be run when tables go up an
order of mangitude in size or so, or a little bit less...like when the
table grows 50% or so.
> > default autovacuum paramater. if you followed my earlier
> > recommendations, you are aware that autovacuum (which also analyzes)
> > is not running during bulk inserts, right?
> It's intuitivly obvious, but I can't do bulk inserts. It's just not the
> nature of what we are doing with the data.
right.
> This is currently being done programmatically. The nature of what we're
> doing is suited for imperitive, navigational logic rather than declarative,
> data set logic; just the opposite of what SQL likes, I know! If there's some
> way to replace thousands of lines of analysis and decision trees with
> ultrafast queries - great...
>
> > important feature of analyze is to tell the planner approx. how big
> > the tables are.
>
> But the tables grow as the process progresses - would you not want the
> server to re-evaluate its strategy periodically?
yes, but it makes the most difference when the tables are small so as
to keep the planner from doing seqscans as they grow.
well it looks like you are on the right track, hopefully the process
runs in an acceptable amount of time at this point.
merlin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: mmoncure@gmail.com, stonec.register@sympatico.ca
Subject: Re: Performance Optimization for Dummies 2 - the SQL
In-Reply-To: <b42b73150610090649y74c4dc99g176366921f784e7b@mail.gmail.com>
References: <eft782$5a1$1@news.hub.org> <b42b73150610041407y3554f311u1329c4f3bdc53999@mail.gmail.com> <eg1dai$1tfa$1@news.hub.org> <b42b73150610042326v7fdeed17rf6b96e52a681a6db@mail.gmail.com> <eg2cds$29en$1@news.hub.org> <b42b73150610050630t76e9eedeh45a382729d35f2f6@mail.gmail.com> <eg611q$l0m$1@news.hub.org> <1160153623.6181.13.camel@state.g2switchworks.com> <b42b73150610061153i3d11d7a4r23e1d7c5317feb9f@mail.gmail.com> <eg6f8l$2det$1@news.hub.org> <b42b73150610090649y74c4dc99g176366921f784e7b@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox