Optimizing for Event-based Analytics (and More)