Re: Convert query plan to sql query

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Convert query plan to sql query
Дата
Msg-id 12359.1415253811@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Convert query plan to sql query  (mariem <mariem.benfadhel@gmail.com>)
Ответы Re: Convert query plan to sql query  (mariem <mariem.benfadhel@gmail.com>)
Список pgsql-hackers
mariem <mariem.benfadhel@gmail.com> writes:
>> I don't think SQL can express the information the plan contains. For example,
>> join methods (hash, nest loop, merge).

> I don't need the way the query will be executed, so there is no need for
> (hash, nest loop, merge).

If you don't need that, why are you insistent on extracting the
information from a plan tree?

It seems far simpler to me to make use of ruleutils.c to reverse-list
the original parsetree.  That functionality already exists and is well
tested and well maintained.  If you insist on working from a plan tree,
you will be writing a fair amount of code that you will have to maintain
yourself.  And I absolutely, positively guarantee that we will break it
in every major release, and occasionally in minor releases.  You should
read the git history of explain.c and ruleutils.c and ask yourself whether
you want to keep up with that level of churn.
        regards, tom lane



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: WAL format and API changes (9.5)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Repeatable read and serializable transactions see data committed after tx start