Re: Query plan - now what?

Shridhar Daithankar <shridhar_daithankar@persistent.co.in>

From: Shridhar Daithankar <shridhar_daithankar@persistent.co.in>
To: "david@shadovitz.com" <david@shadovitz.com>
Cc: "'pgsql-performance@postgresql.org'" <pgsql-performance@postgresql.org>
Date: 2003-12-12T09:14:05Z
Lists: pgsql-performance
David Shadovitz wrote:

> Well, now that I have the plan for my slow-running query, what do I do?  Where 
> should I focus my attention?

Briefly looking over the plan and seeing the estimated v/s actual row mismatch,I 
can suggest you following.

1. Vacuum(full) the database. Probably you have already done it.
2. Raise statistics_target to 500 or more and reanalyze the table(s) in question.
3. Set enable_hash_join to false, before running the query and see if it helps.

  HTH

  Shridhar