In users' dashboard, it's very slow to load action. #10331

Closed
opened 2025-11-02 09:04:30 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @lunny on GitHub (Feb 24, 2023).

Description

#19472 refined the indexes, now we have two indexes group. One is repo_id, user_id, is_deleted, another is "act_user_id", "repo_id", "created_unix", "user_id", "is_deleted". But the most frequent page is the dashboard, it will only be affected by user_id and is_deleted. So I think we should adjust the indexes again. We should add a new index user_id, is_deleted for user's dashboard.

Gitea Version

Latest

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

image

Git Version

No response

Operating System

No response

How are you running Gitea?

self-hosted

Database

None

Originally created by @lunny on GitHub (Feb 24, 2023). ### Description #19472 refined the indexes, now we have two indexes group. One is `repo_id`, `user_id`, `is_deleted`, another is "act_user_id", "repo_id", "created_unix", "user_id", "is_deleted". But the most frequent page is the dashboard, it will only be affected by `user_id` and `is_deleted`. So I think we should adjust the indexes again. We should add a new index `user_id`, `is_deleted` for user's dashboard. ### Gitea Version Latest ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots ![image](https://user-images.githubusercontent.com/81045/221067190-c24ca200-697c-4310-ae43-0b3066d685c5.png) ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? self-hosted ### Database None
GiteaMirror added the performance/speed label 2025-11-02 09:04:30 -06:00
Author
Owner

@rsq424 commented on GitHub (Mar 2, 2023):

add new index
create index IDX_action_u_d_c on action (user_id asc, is_deleted asc, created_unix desc);

@rsq424 commented on GitHub (Mar 2, 2023): add new index `create index IDX_action_u_d_c on action (user_id asc, is_deleted asc, created_unix desc); `
Author
Owner

@lunny commented on GitHub (Mar 2, 2023):

duplicated with #21611

@lunny commented on GitHub (Mar 2, 2023): duplicated with #21611
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#10331