Re: [BUGS] Estimation of Plan quality

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [BUGS] Estimation of Plan quality
Дата
Msg-id AANLkTi=y8P04DxRfkxR775EmNU+B54s8hNhSXm9Hq_J_@mail.gmail.com
обсуждение исходный текст
Ответ на Estimation of Plan quality  (vamsi krishna <vamsikrishna1902@gmail.com>)
Список pgsql-hackers
First, this is not a bug.  Don't post to pgsql-bugs unless you're
reporting a bug.

On Tue, Aug 31, 2010 at 4:38 AM, vamsi krishna
<vamsikrishna1902@gmail.com> wrote:
> Can someone tell me how to estimate the quality of my plan. For example if
> the ideal query plan generated by Dynamic Programming has a plan quality of
> 1.0, and suppose I generate my query plan with some greedy method or
> something, it will be worse (not as optimal as) than ideal plan by,  say,
> 1.5 or 2.0 times , how can I know this factor?
>
> Should it be estimated from the execution time?

I'm not sure there's one right way to do this.  If you know what the
ideal plan is and how fast it runs, comparing that to the actual plan
seems like a reasonable thing to do...

> In the plan generated by PostgreSQL when I give explain query, I see Plan
> cost at the top of the plan with some exponential value. What does it
> indicate? Is it the estimated execution time? or Is it the search space that
> has been considered during plan execution?

...but if you haven't used the planner enough to understand the
EXPLAIN output, there is a good chance you don't understand it well
enough to experiment with modifications, either.  The answers to the
questions above can be found in our fine documentation, specifically
the second paragraph of the EXPLAIN documentation:

http://www.postgresql.org/docs/8.4/static/sql-explain.html

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: Synchronous replication - patch status inquiry
Следующее
От: fazool mein
Дата:
Сообщение: Re: Synchronous replication - patch status inquiry