Currently, when the PE console queries the aggregate event counts endpoint and requests summarize_by="containing_class,certname,resource"}}l, the event-counts query performs the three queries in separate queries joined by {{UNION ALL. This results in the events query being run three times. Instead, we can likely get the same results using GROUPING SETS, which will only execute the underlying query once.