Re: An Idea for planner hints

Поиск
Список
Период
Сортировка
От AgentM
Тема Re: An Idea for planner hints
Дата
Msg-id 41EB4E79-4DE0-4A40-99EC-9AA1B69C6BB8@themactionfaction.com
обсуждение исходный текст
Ответ на Re: An Idea for planner hints  ("Jim C. Nasby" <jnasby@pervasive.com>)
Ответы Re: An Idea for planner hints
Список pgsql-hackers
On Aug 15, 2006, at 10:40 , Jim C. Nasby wrote:
>
> Yeah, unless someone comes up with some kind of 'magic', I think  
> trying
> to handle every cross-column possibility is a non-starter. IIRC, that
> argument is what's stalled cross-column stats every time in the  
> past. It
> makes a lot more sense to allow defining what combinations of  
> columns we
> need stats for.
>
> After that's done, it'd be easy to then write a script that will tell
> the database to collect stats on all multi-column indexes, RI, etc.  
> Down
> the road, the planner could even be made to log (in a machine-readable
> format) every time it needs cross-column stats, and that data could be
> used to add stats that are needed.

I've always found it odd that database didn't determine which  
statistics are the most interesting from the queries themselves. At  
the very least, the database could make suggestions: "It looks like  
this prepared query which is used often could benefit from an index  
on x(a,b,c)." That would be better than me guessing.

-M


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

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: Weird idea for pg_stat_activity
Следующее
От: "William ZHANG"
Дата:
Сообщение: Re: ecpg tests make failed on Win32/MinGW