Improving AI Usage Tracking with Refactored Queries
Optimizing AI Token Usage Queries
We've recently refactored and optimized our AI token usage tracking to improve performance and maintainability. This involved extracting duplicated queries and enhancing user filtering.
The Changes
The primary focus was on improving the efficiency of retrieving daily and monthly tenant AI usage data. This was achieved through two key changes: