Re: Can the query planner create indexes?

Поиск
Список
Период
Сортировка
От Gabriele Bartolini
Тема Re: Can the query planner create indexes?
Дата
Msg-id 67ba30fce87cea321b64a34a2acdb575@2ndquadrant.it
обсуждение исходный текст
Ответ на Can the query planner create indexes?  (Dario Beraldi <dario.beraldi@ed.ac.uk>)
Ответы Re: Can the query planner create indexes?  (Dario Beraldi <dario.beraldi@ed.ac.uk>)
Список pgsql-general
 Ciao Dario,

 On Tue, 21 Dec 2010 09:14:36 +0000, Dario Beraldi
 <dario.beraldi@ed.ac.uk> wrote:
> the query run better the planner is not able (allowed?) to create
> such
> index, use it, and drop it once the query is done. Why is it so?

 Because it is not its responsibility. This is the simplest and most
 rational answer.

 I would reply with some questions that hopefully will give you the
 answer. How can you define a 'good' query from a 'bad' query? Consider
 the case when an user launches a wrong query and the planner you propose
 starts creating an index. I believe that would be a mess.

 Then ... how could you project this scenario in a concurrent context
 where multiple users launch queries that 'need' an index?

 I suggest that you look at the documentation for more information.
 Otherwise, I strongly suggest that you read the chapter on the planner
 from Greg's book on High Performance (which you can find from here:
 http://www.postgresql.org/docs/books/)

 Merry Christmas to you too!

 Cheers,
 Gabriele

--
  Gabriele Bartolini - 2ndQuadrant Italia
  PostgreSQL Training, Services and Support
  Gabriele.Bartolini@2ndQuadrant.it - www.2ndQuadrant.it

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

Предыдущее
От: Stefan Keller
Дата:
Сообщение: Re: How to guard PostgreSQL from overcharged and/or malicious (read-only) queries?
Следующее
От: "Massa, Harald Armin"
Дата:
Сообщение: Re: Can the query planner create indexes?