Re: TODO idea - implicit constraints across child tables with a common column as primary key (but obviously not a shared index) - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: TODO idea - implicit constraints across child tables with a common column as primary key (but obviously not a shared index)
Date
Msg-id 87d51toqji.fsf@oxford.xeocode.com
Whole thread Raw
In response to Re: TODO idea - implicit constraints across child tables with a common column as primary key (but obviously not a shared index)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
"Tom Lane" <tgl@sss.pgh.pa.us> writes:

> Gregory Stark <stark@enterprisedb.com> writes:
>> The main data from the statistics that's of interest here are the extreme
>> values of the histogram. If we're not interested in any values in that range
>> then we can exclude the partition entirely.
>
> Except that there is *no* guarantee that the histogram includes the
> extreme values --- to promise that would require ANALYZE to scan every
> table row.

That's why I said:
 a subsequent VACUUM ANALYZE could mark the resulting statistics as "authoritative"

Not just plain analyze.

There's another issue here too. One of the other motivations is to be able to
put read-only tables on read-only media. To do that would require freezing
every tuple which would at the very least involve looking at every tuple. (It
would also involve waiting until all tuples are freezable too.) 

So there's a natural step in which to gather these authoritative statistics
anyways.

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Robert Treat
Date:
Subject: Re: [pgsql-advocacy] Wild idea: 9.0?
Next
From: Magnus Hagander
Date:
Subject: Re: [pgsql-advocacy] Wild idea: 9.0?