Skip site navigation (1) Skip section navigation (2)

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 (view raw, whole thread or download thread mbox)
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

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.


In response to

pgsql-performance by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group