getSetting (WHERE key=?) runs on nearly every subscription request and job tick and had no index, so each lookup full-scans the settings table past the large xrayTemplateConfig blob. Add an index on settings.key; AutoMigrate creates it on existing DBs too. Includes a HasIndex test. |
||
|---|---|---|
| .. | ||
| client_global_traffic.go | ||
| host_test.go | ||
| model.go | ||
| model_mtproto_test.go | ||
| model_test.go | ||
| node_client_ip.go | ||
| node_client_traffic.go | ||