powa-team / powa-archivist

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

Aggregate relation statistics per database #29

Closed CyberDem0n closed 4 years ago

CyberDem0n commented 4 years ago

The change will help to make base_query_all_rels_sample() more efficient for clusters with a lot of relations.

rjuju commented 4 years ago

Hello @CyberDem0n

I'm wondering whether it's worth spending effort for that in v4.0.

How about merging this PR as-is in v4.0 if you still need it, and spend instead effort in v4.1 to drop entirely the powa_all_relation/powa_user_function thing and instead allow the collector to connect to other databases, and retrieve all the information that would be needed?

We'll have to go there anyway, so there's probably no need to delay v4 any further.

CyberDem0n commented 4 years ago

Ok, I updated the query which aggregates statistics per database. This is probably the best we can do right now without having access to pg_index.

rjuju commented 4 years ago

Thanks a lot, merged!

I'll try to work on the UI part to use those new tables quickly so we can finally release v4 and start working on the 4.1 wish list. FTR a new powa-archivist-git docker image should be pushed soon.

Also, feel free to add additional items for the V4.1 scope if you think about more data to aggregate

rjuju commented 4 years ago

@CyberDem0n I just pushed https://github.com/powa-team/powa-web/commit/f48d4aa790c7edb7276979322fc5f5d94f3931da which should use this new infrastructure. Let me know if that fixes your performance issue if you have a way to test that easily.