Modified query for email hourly stats and added composite index on signature table