Vacuum analyse 8.0.3

From: Steve Tucknott <steve(at)retsol(dot)co(dot)uk>
To: PostGreSQL <pgsql-novice(at)postgresql(dot)org>
Subject: Vacuum analyse 8.0.3
Date: 2005-10-02 19:32:53
Message-ID: 1128281573.28565.10.camel@retsol1
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

What effect does vacuum/analyze have on open cursors?
I have a large data load that populates blank tables with unique rows
for an input source. So the load has to read the tables being populated
to see if the rows are already there. The tables have indexes on the
'read' columns, so I thought it would be sensible to 'analyze' the
tables after 'n' thousand rows. So my incoming table 'A' populates
tables 'B', 'C' and 'D', but only if the entries in those tables do not
exist. The reads of 'B', 'C' and 'D' are pre prepared cursors. After
n'000 rows read from 'A' the tables 'B','C' and 'D' are analysed (to
ensure that the optimiser uses the indexes defined) - two questions:
1) Is this required in Postgresql? I'm used to the optimiser judging the
best route when the cursor is declared. My read cursors are all declared
at the beginning when 'B','C' and 'D' contain 0 rows.
2) If it is required, then are the cursors 'dropped' when I analyze
(and/or vacuum) and so need to be redefined after the analysis
completes?

--
Steve Tucknott <steve(at)retsol(dot)co(dot)uk>
ReTSol Ltd

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2005-10-03 01:18:17 Re: Vacuum analyse 8.0.3
Previous Message Peter Schonefeld 2005-10-02 06:07:45 replication