Re: generalizing the planner knobs

Поиск
Список
Период
Сортировка
От Rod Taylor
Тема Re: generalizing the planner knobs
Дата
Msg-id 1133556712.28999.24.camel@home
обсуждение исходный текст
Ответ на Re: generalizing the planner knobs  (Greg Stark <gsstark@mit.edu>)
Список pgsql-hackers
On Fri, 2005-12-02 at 15:49 -0500, Greg Stark wrote:
> Rod Taylor <pg@rbt.ca> writes:
> 
> > > In the extreme, no amount of added intelligence in the optimizer is going to
> > > help it come up with any sane selectivity estimate for something like 
> > > 
> > >   WHERE radius_authenticate(user) = 'OK'
> > 
> > Why not?
> > 
> > The missing capability in this case is to be able to provide or generate
> > (self learning?) statistics for a function that describe a typical result
> > and the cost of getting that result.
> 
> Ok, try "WHERE radius_authenticate(user, (select ...), ?)"
> 
> The point is that you can improve the estimates the planner gets. But you can
> never make them omniscient. There will always be cases where the user knows
> his data more than the planner. And those hints are still valid when a new
> optimizer has new plans available.

You missed my point. If the user knows there data there is absolutely no
reason, aside from missing functionality in PostgreSQL, that statistics
cannot be generated to represent what the user knows about their data.

Once the planner knows the statistics it can make the right decision
without any hints.

The missing feature here is the ability to generate or provide
statistics and costs for functions.



-- 



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Oddity with extract microseconds?
Следующее
От: "John D. Burger"
Дата:
Сообщение: Re: Reduce NUMERIC size by 2 bytes, reduce max length to 508