Thread: Re: [GENERAL] Concurrency problem building indexes

Re: [GENERAL] Concurrency problem building indexes

From
"Zeugswetter Andreas DCP SD"
Date:
> > 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