Re: [PERFORM] Slow Query- Bad Row Estimate

2010-10-29 Thread Ozer, Pam
: Ozer, Pam Cc: Josh Berkus; pgsql-performance@postgresql.org Subject: Re: [PERFORM] Slow Query- Bad Row Estimate "Ozer, Pam" writes: > Yes. The default statistics target was at 1000. So that would be what the column was using correct? But you evidently didn't have stats.

Re: [PERFORM] Slow Query- Bad Row Estimate

2010-10-29 Thread Tom Lane
"Ozer, Pam" writes: > Yes. The default statistics target was at 1000. So that would be what the > column was using correct? But you evidently didn't have stats. Perhaps you have autovacuum turned off? What PG version is this anyway? regards, tom lane -- Sent via pg

Re: [PERFORM] Slow Query- Bad Row Estimate

2010-10-29 Thread Ozer, Pam
Query- Bad Row Estimate On 10/29/10 2:47 PM, Ozer, Pam wrote: > I had just analyzed the dealergroupgeochache table. Wow. Thank you. That did > the trick. Can you give me an explanation of the default_stats work? I don't > think I completely understand what it means when you set it

Re: [PERFORM] Slow Query- Bad Row Estimate

2010-10-29 Thread Josh Berkus
On 10/29/10 2:47 PM, Ozer, Pam wrote: > I had just analyzed the dealergroupgeochache table. Wow. Thank you. That did > the trick. Can you give me an explanation of the default_stats work? I don't > think I completely understand what it means when you set it to 500 instead of > 1000? You're al

Re: [PERFORM] Slow Query- Bad Row Estimate

2010-10-29 Thread Tom Lane
"Ozer, Pam" writes: > I am not sure what you mean by reformulate the data representation. Do > you mean do I have to join on all three columns? No, I was wondering if you could change things so that you join on just one column, instead of two that each tell part of the truth. BTW, did you chec

Re: [PERFORM] Slow Query- Bad Row Estimate

2010-10-29 Thread Ozer, Pam
pgsql-performance-ow...@postgresql.org [mailto:pgsql-performance-ow...@postgresql.org] On Behalf Of Josh Berkus Sent: Friday, October 29, 2010 2:10 PM To: pgsql-performance@postgresql.org Subject: Re: [PERFORM] Slow Query- Bad Row Estimate On 10/29/10 1:54 PM, Ozer, Pam wrote: > "

Re: [PERFORM] Slow Query- Bad Row Estimate

2010-10-29 Thread Ozer, Pam
: [PERFORM] Slow Query- Bad Row Estimate "Ozer, Pam" writes: > Unfortunately I have not received a response on this question. Is more > information needed? Does anyone have any ideas why the estimates may be > bad? Or what I might be able to do to speed this up? The most lik

Re: [PERFORM] Slow Query- Bad Row Estimate

2010-10-29 Thread Kevin Grittner
"Ozer, Pam" wrote: > Is more information needed? Table layouts of the tables involved (including indexes) would be interesting. A description of the machine would be useful, including OS, CPUs, RAM, and disk system. I know you said you might have trouble changing the config, but some of the

Re: [PERFORM] Slow Query- Bad Row Estimate

2010-10-29 Thread Tom Lane
"Ozer, Pam" writes: > Unfortunately I have not received a response on this question. Is more > information needed? Does anyone have any ideas why the estimates may be > bad? Or what I might be able to do to speed this up? The most likely explanation for the bad rowcount estimates is that there

Re: [PERFORM] Slow Query- Bad Row Estimate

2010-10-29 Thread Josh Berkus
On 10/29/10 1:54 PM, Ozer, Pam wrote: > "-> Index Scan using dealergroupgeocache_i01 on > dealergroupgeocache (cost=0.00..5719.56 rows=9055 width=10) (actual > time=0.015..87.689 rows=163491 loops=1)" This appears to be your problem here. a) when was dealergroupgeocache last