Re: Functions and query analysis - EXPLAIN

Поиск
Список
Период
Сортировка
От Andreas Kretschmer
Тема Re: Functions and query analysis - EXPLAIN
Дата
Msg-id 20120210175431.GA13740@tux
обсуждение исходный текст
Ответ на Functions and query analysis - EXPLAIN  (Andy Halsall <halsall_andy@hotmail.com>)
Список pgsql-novice
Andy Halsall <halsall_andy@hotmail.com> wrote:

> Is it possible to use EXPLAIN from inside a function? Have seen this post http:
> //archives.postgresql.org/pgsql-general/2011-04/msg00750.php but can't get it
> to work on even a simple query. Need it to work on a query in a function with a
> UNION.
>
> Perhaps there's a better way of determining if my function is using the indexes
> I'd like it to use?

Not sure if i understand you, but i think, you are looking for the
module AUTO_EXPLAIN. With this, and auto_explain.log_nested_statements =
on, you can see the explain-output in your log.


Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.                              (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly."   (unknown)
Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889°

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

Предыдущее
От: Andy Halsall
Дата:
Сообщение: Functions and query analysis - EXPLAIN
Следующее
От: Alessandro Gagliardi
Дата:
Сообщение: insert fail gracefully if primary key already exists