Re: Searching for the cause of a bad plan

From: Csaba Nagy <nagy(at)ecircle-ag(dot)com>
To: Kenneth Marshall <ktm(at)rice(dot)edu>
Cc: Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com>, postgres performance list <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Searching for the cause of a bad plan
Date: 2007-09-28 12:33:52
Message-ID: 1190982832.5430.94.camel@PCD12478
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

> Just an idea, but with the 8.3 concurrent scan support would it be
> possible to hang a more in depth analyze over exisiting sequential
> scans. Then it would be a lower cost to have higher resolution in
> the statistics because the I/O component would be hidden.

The biggest problem with that is that it wouldn't be deterministic...
the table in question from my original post is never scanned
sequentially in normal operation. The other way around is also possible,
when sequential scans are too frequent, in that case you wouldn't want
to also analyze all the time. So there would be a need for logic of when
to analyze or not with a sequential scan and when do it proactively
without waiting for one... and I'm not sure it will be worth the
complexity.

I think it would me much more productive if some "long running query"
tracking combined with a "background planner" thread would do targeted
analyzes for specific correlations/distributions/conditions based on
what queries are actually running on the system.

Cheers,
Csaba.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Merlin Moncure 2007-09-28 13:17:51 Re: Tuning for warm standby
Previous Message Csaba Nagy 2007-09-28 08:12:10 Re: Searching for the cause of a bad plan