puppet-dashboard icon indicating copy to clipboard operation
puppet-dashboard copied to clipboard

reports:prune:orphaned taking a lot of time

Open bigon opened this issue 10 years ago • 0 comments

Hi,

I think that the queries in the "reports:prune:orphaned" target are not really optimized.

On my PE setup (using postgresql), the following query is now running for more than an hour just to do a count

SELECT COUNT(*) FROM "metrics"  WHERE (report_id not in (select id from reports))

bigon avatar Jun 24 '15 17:06 bigon