Re: [PERFORM] strange index behaviour with different statistics target

2009-01-13 Thread Jeff Frost
On Tue, 13 Jan 2009, Tom Lane wrote: Jeff Frost writes: On Tue, 13 Jan 2009, Tom Lane wrote: It would change the size of the sample for the table, which might improve the accuracy of the stats. IIRC you'd still get the same number of histogram entries and most-common-values for the other col

Re: [PERFORM] strange index behaviour with different statistics target

2009-01-13 Thread Tom Lane
Jeff Frost writes: > On Tue, 13 Jan 2009, Tom Lane wrote: >> It would change the size of the sample for the table, which might >> improve the accuracy of the stats. IIRC you'd still get the same number >> of histogram entries and most-common-values for the other columns, but >> they might be more

Re: [PERFORM] strange index behaviour with different statistics target

2009-01-13 Thread Jeff Frost
On Tue, 13 Jan 2009, Tom Lane wrote: Jeff Frost writes: So, my question is, should changing the stats target on the shape column affect the stats for the content_id and content_type columns? It would change the size of the sample for the table, which might improve the accuracy of the stats.

Re: [PERFORM] strange index behaviour with different statistics target

2009-01-13 Thread Tom Lane
Jeff Frost writes: > So, my question is, should changing the stats target on the shape column > affect the stats for the content_id and content_type columns? It would change the size of the sample for the table, which might improve the accuracy of the stats. IIRC you'd still get the same number

[PERFORM] strange index behaviour with different statistics target

2009-01-13 Thread Jeff Frost
So, I had a query that uses a postgis geometry index and the planner was underestimating the number of rows it would return. Because of this, the planner was choosing the geometry index over a compound index on the other columns in the WHERE clause. So, I thought, let me increase the stats target