Re: [GENERAL] pg_stats.avg_width differs by a factor of 4 on different machines

2009-06-01 Thread Tom Lane
Craig de Stigter writes: > Does anyone have any idea why these numbers would be 4 times as big in > Postgres 8.3.7 ? It still doesn't make any sense to me that you're getting values larger than the BLCKSZ. If you look into where that's coming from you might get a clue what's up with the version

Re: [GENERAL] pg_stats.avg_width differs by a factor of 4 on different machines

2009-06-01 Thread Craig de Stigter
This query was giving us good-enough results on our old system. The estimates don't have to be absolutely accurate, just ballpark figures. Also we are estimating the size of zipped shapefiles, not textual geometries. Our tests show that such sizes are quite accurate for medium/large datasets when

Re: [GENERAL] pg_stats.avg_width differs by a factor of 4 on different machines

2009-05-28 Thread Tom Lane
Craig de Stigter writes: > We are using the PostgreSQL pg_stats view to estimate file sizes for some > geodata exports. However, the following query gives us totally different > results on different servers: > select avg_width from pg_stats where tablename='some_geodata' and attname = > 'GEOMETRY

[GENERAL] pg_stats.avg_width differs by a factor of 4 on different machines

2009-05-28 Thread Craig de Stigter
Hi list We are using the PostgreSQL pg_stats view to estimate file sizes for some geodata exports. However, the following query gives us totally different results on different servers: select avg_width from pg_stats where tablename='some_geodata' and attname = > 'GEOMETRY'; > PostgreSQL 8.3.7 on