Re: [HACKERS] Default Stats Revisited

2004-03-12 Thread Simon Riggs
Josh Berkus But possible more error prone. If you crank up the default statistics to 50, but the index default is still 25... OTOH, you could always have the setting of used for index default be whichever is greater... hmmm. Well, I'm not 100% opposed to a multiplier. I'd like to

Re: [HACKERS] Default Stats Revisited

2004-03-11 Thread Josh Berkus
Scott, I like it. Would a multiplier be acceptable? default_stats_index_multiplier = 10 Yeah, I thought about that, but a multiplier would be harder to manage for most people.I mean, what if your default_stats are at 25 and you want your index_stats at 40? PITA. Also, if you

Re: [HACKERS] Default Stats Revisited

2004-03-11 Thread scott.marlowe
On Thu, 11 Mar 2004, Josh Berkus wrote: Scott, I like it. Would a multiplier be acceptable? default_stats_index_multiplier = 10 Yeah, I thought about that, but a multiplier would be harder to manage for most people.I mean, what if your default_stats are at 25 and you want

Re: [HACKERS] Default Stats Revisited

2004-03-11 Thread Josh Berkus
Scott, But possible more error prone. If you crank up the default statistics to 50, but the index default is still 25... OTOH, you could always have the setting of used for index default be whichever is greater... hmmm. Well, I'm not 100% opposed to a multiplier. I'd like to take a poll

Re: [HACKERS] Default Stats Revisited

2004-03-11 Thread Tom Lane
Josh Berkus [EMAIL PROTECTED] writes: Well, I'm not 100% opposed to a multiplier. I'd like to take a poll of DBAs to find out which they would find more accessable. But since most people seem to be ignoring this thread, I'm not sure we'll get much response ... Maybe you should ask on

Re: [HACKERS] Default Stats Revisited

2004-03-11 Thread Josh Berkus
Tom, Maybe you should ask on -admin or -general. Personally I thought there wasn't anything to say until someone did some experiments to show whether an indexed-column differential is really worthwhile and what a plausible default value would be. The idea sounds good in the abstract, but

Re: [HACKERS] Default Stats Revisited

2004-03-11 Thread Robert Treat
On Thursday 11 March 2004 14:17, Josh Berkus wrote: Tom, Maybe you should ask on -admin or -general. Personally I thought there wasn't anything to say until someone did some experiments to show whether an indexed-column differential is really worthwhile and what a plausible default

Re: [HACKERS] Default Stats Revisited

2004-03-11 Thread Josh Berkus
Robert, Do you plan on handeling primary key columns differently (since they are likely to be unique and indexed) ? The same as any other indexed column. Also how will you handle column that are part of expressional indexes (where foo is true for example) ? See my original proposal.

Re: [HACKERS] Default Stats Revisited

2004-03-11 Thread Tom Lane
Josh Berkus [EMAIL PROTECTED] writes: Also how will you handle column that are part of expressional indexes (where foo is true for example) ? See my original proposal. These columns will be ignored. Expressions have their own stats. Yeah, I see no particular need to increase the stats

Re: [HACKERS] Default Stats Revisited

2004-03-11 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: Another idea is whether a foreign key column should get extra statistics? In practice, both ends of an FK relationship have to be indexed, so I don't see that we need any extra special case for that. regards, tom lane

Re: [HACKERS] Default Stats Revisited

2004-03-11 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: Another idea is whether a foreign key column should get extra statistics? In practice, both ends of an FK relationship have to be indexed, so I don't see that we need any extra special case for that. Do they? We don't create an

Re: [HACKERS] Default Stats Revisited

2004-03-11 Thread Josh Berkus
Bruce, Do they? We don't create an index automatically when using REFERENCES. We do create an index for PRIMARY KEY. I was just wondering if the REFERENCES column is more sensitive to join usage and would benefit from more accurate statistics even if it doesn't have an index. I don't