powa-team / powa-web

PoWA user interface
http://powa.readthedocs.io/
73 stars 31 forks source link

No example values with pg_qualstats #153

Closed tbe closed 2 years ago

tbe commented 2 years ago

On partitioned tables, the Predicates tab does not generate execution plans, as there are no example values. The Predicates contain at least one entry for each table: image

Only some of them contains actually a list of "Most executed values".

rjuju commented 2 years ago

Hi,

I don't fully understand the problem here.

The Predicates contain at least one entry for each table

do you mean per table as root partition table or per partition?

as there are no example values

As far as I can see pg_qualstats does get example values if the query is sampled. Now depending on partition pruning the set of partitions for which we see a qual (and thefore sample values) will vary, maybe that's your problem?

tbe commented 2 years ago

do you mean per table as root partition table or per partition?

Sry, per partition. The screenshot attached shows these quals with mostly 0 executions.

As far as I can see pg_qualstats does get example values if the query is sampled. Now depending on partition pruning the set of partitions for which we see a qual (and thefore sample values) will vary, maybe that's your problem?

I had a look inside the _current tables for the PoWA Qualstats data, and i can clearly see sample data for the QueryID used in the URL. So, i would assume that the issue is not within the collection.

I haven't had time yet to break down the statement to retrieve the most* values, used by powa-web to create execution plans.

tbe commented 2 years ago

After some research, we found out this issue affects non-partitioned tables also. In fact, most of our databases have the same issue.

The reason for that seems to be inside the collection / aggregate logic, and not in Powa-Web. I will open an issue at the Archivist project instead

rjuju commented 2 years ago

Oh ok. That's interesting. Thanks a lot, waiting for the new issue!