Re: [PERFORM] Re: OLAP/reporting queries fall into nested loops overseq scans or other horrible planner choices

Поиск
Список
Период
Сортировка
От Adam Brusselback
Тема Re: [PERFORM] Re: OLAP/reporting queries fall into nested loops overseq scans or other horrible planner choices
Дата
Msg-id CAMjNa7dy23vwG4UEoTe+xcgJF6xj7bptVra_-BgieGTpJUYOSg@mail.gmail.com
обсуждение исходный текст
Ответ на [PERFORM] Re: OLAP/reporting queries fall into nested loops over seq scans orother horrible planner choices  (Thomas Kellerer <spam_eater@gmx.net>)
Ответы Re: [PERFORM] Re: OLAP/reporting queries fall into nested loops overseq scans or other horrible planner choices  (Gunther <raj@gusw.net>)
Список pgsql-performance
On Fri, Nov 3, 2017 at 5:28 AM, Thomas Kellerer <spam_eater@gmx.net> wrote:
> I do like Oracle's approach with SQL profiles, where you can force the
> optimizer to try harder to find a good execution plan. I _think_ it even
> runs the statement with multiple plans and compares the expected outcome
> with the actual values. Once a better plan is found that plan can be
> attached to that query and the planner will use that plan with subsequent
> executions.

I also think that this is a really cool approach.  For those specific
problem queries, pretty much tell the optimizer "do your best to make
this as efficient as possible".

To make that more useful though, you'd probably need a shared query
cache that would be persisted through restarts.  I'd assume if you
have a problem query, this very heavy "planning / optimization"
operation would not be something you wanted every connection to have
to do every time they connect.

I wish I was more knowledgeable about the internals so I could more
clearly see how a system like that could come together, and what other
groundwork would be needed building up to it.


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance

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

Предыдущее
От: Thomas Kellerer
Дата:
Сообщение: [PERFORM] Re: OLAP/reporting queries fall into nested loops over seq scans orother horrible planner choices
Следующее
От: Gunther
Дата:
Сообщение: Re: [PERFORM] Re: OLAP/reporting queries fall into nested loops overseq scans or other horrible planner choices