perf(db): index group_name and client_traffics hot columns (#5268)

* perf(db): index group_name and client_traffics hot columns

* fix

---------

Co-authored-by: Sanaei <ho3ein.sanaei@gmail.com>
This commit is contained in:
n0ctal
2026-06-15 01:54:59 +05:00
committed by GitHub
parent d14f341b21
commit 2188830612
3 changed files with 42 additions and 2 deletions
+1 -1
View File
@@ -571,7 +571,7 @@ type ClientRecord struct {
ExpiryTime int64 `json:"expiryTime" gorm:"column:expiry_time"`
Enable bool `json:"enable" gorm:"default:true"`
TgID int64 `json:"tgId" gorm:"column:tg_id"`
Group string `json:"group" gorm:"column:group_name;default:''"`
Group string `json:"group" gorm:"column:group_name;default:'';index:idx_client_record_group"`
Comment string `json:"comment"`
Reset int `json:"reset" gorm:"default:0"`
CreatedAt int64 `json:"createdAt" gorm:"autoCreateTime:milli"`