Re:

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Cole <cole(dot)jeff(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re:
Date: 2007-03-06 01:54:52
Message-ID: 25081.1173146092@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Jeff Cole <cole(dot)jeff(at)gmail(dot)com> writes:
> Hi, I'm new to tuning PostgreSQL and I have a query that gets slower
> after I run a vacuum analyze. I believe it uses a Hash Join before
> the analyze and a Nested Loop IN Join after. It seems the Nested
> Loop IN Join estimates the correct number of rows, but underestimates
> the amount of time required. I am curious why the vacuum analyze
> makes it slower and if that gives any clues as too which parameter I
> should be tuning.

Hm, the cost for the upper nestloop is way less than you would expect
given that the HASH IN join is going to have to be repeated 100+ times.
I think this must be due to a very low "join_in_selectivity" estimate
but I'm not sure why you are getting that, especially seeing that the
rowcount estimates aren't far off. Can you show us the pg_stats
rows for symptoms.id and symptom_reports.symptom_id?

regards, tom lane

In response to

  • at 2007-03-05 22:05:41 from Jeff Cole

Responses

  • Re: at 2007-03-06 15:40:11 from Jeff Cole

Browse pgsql-performance by date

  From Date Subject
Next Message Guido Neitzer 2007-03-06 02:14:48 Re: strange performance regression between 7.4 and 8.1
Previous Message Steinar H. Gunderson 2007-03-06 01:31:46 Re: Opinions on Raid