Re: Re: Query not using index

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Re: Query not using index
Дата
Msg-id 200105102347.f4ANlDv06875@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: Re: Query not using index  ("Richard Huxton" <dev@archonet.com>)
Список pgsql-general
> Is there a good reason why rdbms don't just keep a cache of decisions on
> this stuff. I realise SQL is supposed to be ad-hoc but in reality, it's the
> old 90:10 rule where a handful of queries get run consistently and where
> performance is important.
>
> Why doesn't PG (or any other system afaik) just have a first guess, run the
> query and then if the costs are horribly wrong cache the right result. I'm
> guessing there's a bloody good reason (TM) for it since query planning has
> got to be equivalent to least-cost path so NP (NP-Complete? I forget - too
> long out of college).

I have asked about this before.  Decisions about sequential/index scans
could be theoretically fed from the executor back to the optimizer for
later user.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Re: Query not using index
Следующее
От: ryan@paymentalliance.net
Дата:
Сообщение: Re: Query not using index