improve query speed
Merge pull request #2 from AncientLysine/Events

improve query speed