[postgis-devel] estimated_extent & pg_statistic

Martin Schäfer Martin.Schaefer at cadcorp.com
Thu Feb 23 01:20:49 PST 2006


Hi strk,
 
The pg_statistic.stanumbers1 don't make it into the pg_stats view, because stakind1 has a value of 100, instead of 2.
 
I know nothing about the meaning of the pg_statistic columns or in particular the meaning of the values 2 and 100, but there seem to be two options:
 
1) Set stakind1 to 2 instead of 100. I don't know whether this breaks anything.
2) Set stakind2 (currently 0) to 2 and set stanumbers2 (currently null) to stanumbers1[5:8].
 
I presume all of these values are set during vacuum analyze.
 
If any of the two options were realized, then the estimated extent will appear as pg_stats.most_common_freqs and the estimated_extent() function could be changed to use pg_stats instead of pg_statistic.
 
Would it be possible to change the vacuum analyze code accordingly?
 
Martin

________________________________

From: postgis-devel-bounces at postgis.refractions.net on behalf of strk at refractions.net
Sent: Wed 22/02/2006 15:54
To: PostGIS Development Discussion
Subject: Re: [postgis-devel] estimated_extent & pg_statistic



On Wed, Feb 22, 2006 at 02:38:15PM -0000, Martin Schäfer wrote:
> But it only needs to know it about tables that are readable by the user. It doesn't need to know it about tables where the user has no read access.
> 
> What about using the pg_stats view instead of the pg_statistic table?

If the view takes that into consideration it is ok for me.
Willing to send a patch ?
--strk;
_______________________________________________
postgis-devel mailing list
postgis-devel at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-devel



-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 5380 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20060223/7595bbbd/attachment.bin>


More information about the postgis-devel mailing list