Re: PostgreSQL: query optimizer: viewing query plans

Поиск
Список
Период
Сортировка
От CoL
Тема Re: PostgreSQL: query optimizer: viewing query plans
Дата
Msg-id brrunf$2j7n$1@news.hub.org
обсуждение исходный текст
Ответ на PostgreSQL: query optimizer: viewing query plans  (nzanella@cs.mun.ca (Neil Zanella))
Список pgsql-admin
Hi,

Neil Zanella wrote:

> Hello,
>
> Several textbooks talk about query trees and query plans including the following
> relatively recent book <http://www.oreilly.com/catalog/sqltuning/> which covers
> how to apply performance tuning techniques by using knowledge about the query
> optimizer to rewrite SQL queries so that they get interpreted more efficiently.
>
> Unfortunately the book only shows how to view the query plan associated witht the
> given query for Oracle, IBM DB2, and MS SQL Server. I wonder whether PostgreSQL
> also has a way to let the user see the heuristically computed query plan created
> by the query optimizer. Is it possible to view query plans with PostgreSQL server
> and its related command line interfaces? How would I run such a command?

explain query
explain analyze query

and you can set logging in postgres.conf, and you can log
debug_print_XXX  things (xxx like parse, rewritten query, the plan)

C.

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

Предыдущее
От: nzanella@cs.mun.ca (Neil Zanella)
Дата:
Сообщение: PostgreSQL: query optimizer: viewing query plans
Следующее
От: "Iain"
Дата:
Сообщение: FATAL: unrecognized configuration parameter "show_statement_stats"