Re: [PERFORM] Use my (date) index, darn it!

2004-01-05 Thread Tom Lane
John Siracusa [EMAIL PROTECTED] writes: Obviously the planner is making some bad choices here. A fair conclusion ... I know that it is trying to avoid random seeks or other scary things implied by a correlation statistic that is not close to 1 or -1, but it is massively overestimating the

Re: [PERFORM] Use my (date) index, darn it!

2004-01-05 Thread John Siracusa
On 1/5/04 1:55 AM, Tom Lane wrote: John Siracusa [EMAIL PROTECTED] writes: Obviously the planner is making some bad choices here. A fair conclusion ... I know that it is trying to avoid random seeks or other scary things implied by a correlation statistic that is not close to 1 or -1, but

Re: [PERFORM] Use my (date) index, darn it!

2004-01-05 Thread Tom Lane
John Siracusa [EMAIL PROTECTED] writes: Is there any way to uncluster a table? Should I just cluster it on a different column? That should work, if you choose one that's uncorrelated with the previous clustering attribute. regards, tom lane

Re: [PERFORM] Use my (date) index, darn it!

2004-01-05 Thread Christopher Browne
After a long battle with technology, [EMAIL PROTECTED] (John Siracusa), an earthling, wrote: On 1/5/04 1:55 AM, Tom Lane wrote: John Siracusa [EMAIL PROTECTED] writes: Obviously the planner is making some bad choices here. A fair conclusion ... I know that it is trying to avoid random

Re: [PERFORM] Use my (date) index, darn it!

2004-01-05 Thread John Siracusa
On 1/5/04 11:45 AM, Christopher Browne wrote: It sounds to me as though the statistics that are being collected aren't good enough. That tends to be a sign that the quantity of statistics (e.g. - bins in the histogram) are insufficient. This would be resolved by changing the number of bins

Re: [PERFORM] Use my (date) index, darn it!

2004-01-05 Thread Christopher Browne
In the last exciting episode, [EMAIL PROTECTED] (John Siracusa) wrote: What column(s) should I increase? Do I have to do anything after increasing the statistics, or do I just wait for the stats collector to do its thing? You have to ANALYZE the table again, to force in new statistics. And if