Skip to content

fix: optimize console statistics queries to prevent freezing and improve#127

Open
Ember-Moth wants to merge 1 commit intoperfect-panel:developfrom
Ember-Moth:fix
Open

fix: optimize console statistics queries to prevent freezing and improve#127
Ember-Moth wants to merge 1 commit intoperfect-panel:developfrom
Ember-Moth:fix

Conversation

@Ember-Moth
Copy link
Copy Markdown
Contributor

  • Replace N+1 daily loop in QueryServerTotalData with batch IN query
  • Parallelize 3 traffic_log scans using sync.WaitGroup
  • Replace per-server FindOneServer N+1 calls with batch WHERE id IN query
  • Add Redis caching (60s TTL) for all three console statistics endpoints
  • Fix date boundary handling: use >= start AND < nextDay instead of BETWEEN
  • Add migration 02126: composite index on system_logs(type, date)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant