Re: performance of IN (subquery)

From: Paul Tillotson <pntil(at)shentel(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: performance of IN (subquery)
Date: 2004-08-27 14:07:30
Message-ID: 412F4022.4090607@shentel.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


>2. Instability of plans. Right now, the planner will not change plans
> underneath you --- you have to issue an explicit VACUUM or ANALYZE
> to change the terms of discussion. That would stop being true if
> physical file size were always taken into account. Maybe this is a
> problem, or maybe it isn't ... as someone who likes to be able to
> debug planner behavior without actually creating umpteen-gig test
> tables, my world view may be a bit skewed ...
>
>It's certainly doable if we decide the pluses outweigh the minuses.
>Thoughts?
>
>
>
Even though Ijust proposed it, now I think that the idea of having
postgres automatically gather statistics only when an estimate is
grossly wrong is not a good one. This will just obscure the need to run
analyze, and many people will then always be using moderately bad
statistics without realizing it.

(I think I used postgres in a production environment for about six
months without even knowing about the ANALYZE command--with small data
sets it's not obvious--and it was still blazingly fast compared to foxpro.)

If pgautovacuum does ANALYZE and we can get most people to use
pgautovacuum, I think this problem will go away.

Another possibility is simply to make postgres generate a warning, saying:

WARNING: statistics for table xxxxxx are off by a factor of y. You
should ANALYZE this table.

Paul

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-08-27 14:20:50 Re: performance of IN (subquery)
Previous Message Tom Lane 2004-08-27 13:57:39 Re: performance of IN (subquery)