perf(admin-usage): avoid expensive count on large usage_logs pagination

This commit is contained in:
xvhuan
2026-03-04 13:46:08 +08:00
parent 46ea9170cb
commit 05b1c66aa8
7 changed files with 167 additions and 79 deletions

View File

@@ -154,6 +154,8 @@ type UsageLogFilters struct {
BillingType *int8
StartTime *time.Time
EndTime *time.Time
// ExactTotal requests exact COUNT(*) for pagination. Default false for fast large-table paging.
ExactTotal bool
}
// UsageStats represents usage statistics