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

From: Robert Nix <robert(at)urban4m(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: How can i monitor exactly what (partition) tables are accessed by a query?
Date: 2014-09-18 18:44:07
Message-ID: CAC2EkfPNMxaFN2nQpRF-VeByks-Hh64Ev3JbmyFJ=EqAx+D9zw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message cowwoc 2014-09-18 18:44:48 Re: Why isn't Java support part of Postgresql core?
Previous Message John R Pierce 2014-09-18 18:20:05 Re: Why isn't Java support part of Postgresql core?