Re: How can i monitor exactly what (partition) tables are accessed by a query?

Поиск
Список
Период
Сортировка
От David G Johnston
Тема Re: How can i monitor exactly what (partition) tables are accessed by a query?
Дата
Msg-id 1411090752014-5819582.post@n5.nabble.com
обсуждение исходный текст
Ответ на How can i monitor exactly what (partition) tables are accessed by a query?  (Robert Nix <robert@urban4m.com>)
Ответы Re: Re: How can i monitor exactly what (partition) tables are accessed by a query?  (Robert Nix <robert@urban4m.com>)
Список pgsql-general
Robert Nix wrote
> I'm experiencing a problem with queries apparently not using the check
> constraints of my partition tables (tried constraint_exclusion =partition
> and =on with same results) and explain isn't sufficient to diagnose the
> issue because the value for the check constraint in the query comes from a
> join condition.
>
> What i need is a way to see exactly what tables are actually accessed by
> the query.
>
> When i hardcode the check constraint column's value into the query, the
> explain plan reports what i expect it should be executing but the
> performance of the query indicates that the partitions are not actually
> being used when the check constraint value is obtained from a join
> condition.
>
> Any and all help appreciated.
> --
> .nix

Please provide a minimal schema and example query so we can explain exactly
where your misunderstanding is coming from.  Generally, though, a partiton
must be excluded during plan time so the data in a table will not effect the
final plan - only constants can do that.

You should read this:

http://www.postgresql.org/docs/9.3/static/ddl-partitioning.html

and then ask specific questions with, ideally, working examples.

And you should also provide an EXPLAIN ANALYZE since that will show almost
everything that is touched by the executor.

David J.



--
View this message in context:
http://postgresql.1045698.n5.nabble.com/How-can-i-monitor-exactly-what-partition-tables-are-accessed-by-a-query-tp5819534p5819582.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


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

Предыдущее
От: Jov
Дата:
Сообщение: Re: How can i monitor exactly what (partition) tables are accessed by a query?
Следующее
От: Robert Nix
Дата:
Сообщение: Re: How can i monitor exactly what (partition) tables are accessed by a query?