On Wed, Apr 26, 2006 at 07:13:08PM -0400, Tom Lane wrote: > "Jim C. Nasby" <[EMAIL PROTECTED]> writes: > > What about not updating if the tuplecount is within X percent? Would > > that be safe enough to back-port? > > Even if you got agreement that it was a good idea (I don't think so > myself), it wouldn't help Wes, at least not for values of X smaller > than 100. Presumably, that first CREATE INDEX is trying to update > reltuples from zero to reality.
It may be, but an ANALYZE would eliminate that need and be far faster than waiting on one entire CREATE INDEX. I'm thinking that even being of by as much as 5% won't matter to the planner, and I can't think of any possible reason to need an exact tuplecount in pg_class... > Also, the first CREATE INDEX has to set relhasindex = true, and that's > not fuzzy at all. Oh, will each index build try and do that? Would changing that be non-invasive enough to backpatch (I'm guessing it's just an added conditional...) -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461 ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend