Mon Mar 24 07:55:23 PDT 2008
- Previous message: [Slony1-general] Initial replication analyze
- Next message: [Slony1-general] Initial replication analyze
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Henry" <henry at zen.co.za> writes: > Hello all, > > During an initial replication from a master to many slaves, why does slony > perform an ANALYZE after the COPY? For paltry tables this is OK, but for > massive (multiple GB) tables, this is something which takes frigging > *days* per table. > > Besides, what's the point of analyzing after a fresh COPY? > > Even if there is a valid reason to analyze after a copy, is there a way to > disable this behavior (short of hacking the src)? The docs don't tell me > much. COPY does not populate statistics in pg_statistic, so it is *necessary* to ANALYZE the table so that you don't get pathological awful behaviour like a default of assuming the table contains 1000 tuples so that updates may be reasonably performed via Seq Scan. The ANALYZE is there because it is necessary. And unless you have been heavily hacking with "SET STATISTICS," an analyze on even a large table shouldn't be taking painfully long - it normally scans 3000 pages, many of which ought to be _in memory_, and even if they're not, that's still merely 24MB worth of reads. -- (format nil "~S@~S" "cbbrowne" "ca.afilias.info") <http://dba2.int.libertyrms.com/> Christopher Browne (416) 673-4124 (land)
- Previous message: [Slony1-general] Initial replication analyze
- Next message: [Slony1-general] Initial replication analyze
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list