Re: Changing the result set to contain the cost of the optimizer's chosen plan

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Changing the result set to contain the cost of the optimizer's chosen plan
Дата
Msg-id CAMsr+YG-p7yd7DVdOOhX+t3kr4AOdCFG9nq-Tv3uqvj2LTqxQg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Changing the result set to contain the cost of the optimizer's chosen plan  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Changing the result set to contain the cost of the optimizer's chosen plan  (Srinivas Karthik V <skarthikv.iitb@gmail.com>)
Список pgsql-hackers
On 11 July 2016 at 23:29, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Srinivas Karthik V <skarthikv.iitb@gmail.com> writes:
> Specifically, I have a Java program which calls
> ResultSet rs = statement.executeQuery("explain select * from table");
> I would like to change PostgreSQL such that ResultSet rs should contain a
> field that contains also the cost of the optimizer chosen plan.

Why do you need to change anything?  The cost is right there in the
first line of the result text.  It might be easier to parse out if
you use one of EXPLAIN's intended-to-be-machine-readable output
formats, though.

Yeah - if we were going to do this at all, it'd want to be output that decomposes _all_ the explain output into columns.  But since we can emit json, xml, etc, I don't really see the point.

--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: remove checkpoint_warning
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: remove checkpoint_warning