powa-team / powa-archivist

powa-archivist: the powa PostgreSQL extension
http://powa.readthedocs.io/
PostgreSQL License
51 stars 20 forks source link

Fix powa_qualstats_aggregate_constvalues_current #41

Closed anayrat closed 3 years ago

anayrat commented 3 years ago

Fix #40

This PR fix bugs on powa_qualstats_aggregate_constvalues_current: wrong order by from a copy paste and wrong column name. It also include a rewrite to get rid of LATERAL clause and use window functions. Execution is much more faster between 2 to 600x faster.

rjuju commented 3 years ago

Thanks a lot, this will be quite helpful on environment with many quals and/or users and/or db!