[Info-ingres] stats on tables with more than 1million rows

Karl and Betty Schendel schendel at kbcomputer.com
Mon Jan 30 16:28:34 UTC 2017


If the column is constrained in some way to be unique, then sampling certainly should
not assume otherwise (unless the sample gets non-unique values!).  I don't think optimizedb
or create stats makes this inference at present, and it should.  That is something
we can take a look at.

Karl


> On Jan 30, 2017, at 3:41 AM, Martin Bowes <martin.bowes at ndph.ox.ac.uk> wrote:
> 
> Yes it's a single column unique primary key. So I would expect a count 1.
> 
> Marty
> 
> -----Original Message-----
> From: Paul White [mailto:paul.white at shift7solutions.com.au] 
> Sent: 28 January 2017 06:17
> To: 'Ingres and related product discussion forum'
> Subject: Re: [Info-ingres] stats on tables with more than 1million rows
> 
> Hi Marty and Karl,
> 
> If there is just a single column as unique primary key, the count needs to be 1, yes?
> 
> Paul
> 
> -----Original Message-----
> From: info-ingres-bounces at lists.planetingres.org
> [mailto:info-ingres-bounces at lists.planetingres.org] On Behalf Of Karl and Betty Schendel
> Sent: Saturday, 28 January 2017 3:15 PM
> To: Ingres and related product discussion forum
> Subject: Re: [Info-ingres] stats on tables with more than 1million rows
> 
> Problem is, if you've sampled, you might have simply managed to get unique values.  I can easily imagine a table with values like 1, 1, 2, 2, 3, 3, 4, 4, getting only one of the two values when sampling, thus the sample would look unique but the true count per value is 2.
> 
> I don't know if there is a good answer, other than not sampling.
> 
> _______________________________________________
> Info-ingres mailing list
> Info-ingres at lists.planetingres.org
> http://lists.planetingres.org/mailman/listinfo/info-ingres
> _______________________________________________
> Info-ingres mailing list
> Info-ingres at lists.planetingres.org
> http://lists.planetingres.org/mailman/listinfo/info-ingres




More information about the Info-ingres mailing list