mirror of
https://github.com/go-gitea/gitea.git
synced 2026-06-18 07:13:35 +02:00
The c_u index on the action table was defined as (user_id, is_deleted) without created_unix. The dashboard feed query filters by those two columns and then orders by created_unix DESC, so the database had to load and sort every matching row before it could return the first page of 20 — causing 27+ second queries on large action tables. Adds created_unix as the third column of the c_u index so the database can seek to (user_id, is_deleted) and walk created_unix in reverse order, stopping after 20 rows without a full sort. Assisted-by: Claude:claude-sonnet-4-6