Re: [GENERAL] Concurrency problem building indexes - Mailing list pgsql-hackers

From Zeugswetter Andreas DCP SD
Subject Re: [GENERAL] Concurrency problem building indexes
Date
Msg-id E1539E0ED7043848906A8FF995BDA579FC326B@m0143.s-mxs.net
Whole thread Raw
List pgsql-hackers
> > Wes, you could most likely solve your immediate problem if you did
an
> > analyze before creating the indexes.
>
> I can try that.  Is that going to be a reasonable thing to do when
there's
> 100 million rows per table?  I obviously want to minimize the number
of
> sequential passes through the database.

No, I think it would only help if it gets the exact tuple count.
For large tables it only gets an exact count with a full scan
(use vacuum instead of analyze).

Then again, when the table is large, the different "create index"es
should finish at sufficiently different times, so an analyze might
be sufficient to fix the problem for small tables.

(analyze is fast for large tables since it only does a sample)

Andreas


pgsql-hackers by date:

Previous
From: "A.M."
Date:
Subject: Re: [PATCHES] Implementing RESET CONNECTION ...
Next
From: Tom Lane
Date:
Subject: Re: [GENERAL] Concurrency problem building indexes