feat(schema): add additional indexes to LiteLLM_SpendLogs for improved query performance (#11675)

This commit is contained in:
Cole McIntosh 2025-06-12 18:55:34 -06:00 • committed by GitHub
parent 3b0aab16d4
commit 2a7f113fde
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 0 deletions

View file

@ -266,6 +266,9 @@ model LiteLLM_SpendLogs {
@@index([startTime])
@@index([end_user])
@@index([session_id])
@@index([model_group, cache_hit, startTime, api_base])
@@index([model_group, cache_hit, api_key, startTime])
@@index([model_group, cache_hit, end_user, startTime])
}
// View spend, model, api_key per request

View file

@ -265,6 +265,9 @@ model LiteLLM_SpendLogs {
@@index([startTime])
@@index([end_user])
@@index([session_id])
@@index([model_group, cache_hit, startTime, api_base])
@@index([model_group, cache_hit, api_key, startTime])
@@index([model_group, cache_hit, end_user, startTime])
}
// View spend, model, api_key per request

View file

@ -265,6 +265,9 @@ model LiteLLM_SpendLogs {
@@index([startTime])
@@index([end_user])
@@index([session_id])
@@index([model_group, cache_hit, startTime, api_base])
@@index([model_group, cache_hit, api_key, startTime])
@@index([model_group, cache_hit, end_user, startTime])
}
// View spend, model, api_key per request