Start Page slow with large actions table #12299

Closed
opened 2025-11-02 10:04:51 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @realslacker on GitHub (Jan 5, 2024).

Description

I am using Gitea v1.21.3, and my actions table is about 4.5G. I have 87 repos and belong to several orgs with additional repos.

When logging in the initial query to populate the start page takes 45 seconds to run. After adding two indexes the run time is down to 6.5 seconds... still a long time, but better.

New Indexes:

  1. user table created index on:
    • id
    • visibility
    • keep_activity_private
    • type
  2. team_user table created index on:
    • uid

Screenshots

image

Gitea Version

1.21.3

Can you reproduce the bug on the Gitea demo site?

No

Operating System

Windows 10

Browser Version

Firefix 121.0

Originally created by @realslacker on GitHub (Jan 5, 2024). ### Description I am using Gitea v1.21.3, and my actions table is about 4.5G. I have 87 repos and belong to several orgs with additional repos. When logging in the initial query to populate the start page takes 45 seconds to run. After adding two indexes the run time is down to 6.5 seconds... still a long time, but better. New Indexes: 1. user table created index on: - id - visibility - keep_activity_private - type 2. team_user table created index on: - uid ### Screenshots ![image](https://github.com/go-gitea/gitea/assets/552756/6eee5e66-e3ab-4dcc-9418-637cff96d2a7) ### Gitea Version 1.21.3 ### Can you reproduce the bug on the Gitea demo site? No ### Operating System Windows 10 ### Browser Version Firefix 121.0
GiteaMirror added the type/bug label 2025-11-02 10:04:51 -06:00
Author
Owner

@techknowlogick commented on GitHub (Jan 6, 2024):

Thanks for this report. Which DB are you using? And, just because I'm curious, how many rows are in the actions table, what timespan do they cover, and is the significant number of rows in the actions table primarily due to mirrors updating or some other reason?

@techknowlogick commented on GitHub (Jan 6, 2024): Thanks for this report. Which DB are you using? And, just because I'm curious, how many rows are in the actions table, what timespan do they cover, and is the significant number of rows in the actions table primarily due to mirrors updating or some other reason?
Author
Owner

@lunny commented on GitHub (Jan 6, 2024):

Maybe duplicated #28155 and resolved by #28546

@lunny commented on GitHub (Jan 6, 2024): Maybe duplicated #28155 and resolved by #28546
Author
Owner

@realslacker commented on GitHub (Jan 8, 2024):

@techknowlogick We are using MariaDB 11.1, there currently 6,140,941 records in the table. Records range from Sept 30 2019 to today. It looks like the majority of the operations are op_type = 5, which looks to me to be commits.

@realslacker commented on GitHub (Jan 8, 2024): @techknowlogick We are using MariaDB 11.1, there currently 6,140,941 records in the table. Records range from Sept 30 2019 to today. It looks like the majority of the operations are op_type = 5, which looks to me to be commits.
Author
Owner

@lunny commented on GitHub (Jan 15, 2024):

Since #28546 merged, I think this can be closed. Please feel free to reopen it if there is further information.

@lunny commented on GitHub (Jan 15, 2024): Since #28546 merged, I think this can be closed. Please feel free to reopen it if there is further information.
Author
Owner

@github-actions[bot] commented on GitHub (Mar 1, 2024):

Automatically locked because of our CONTRIBUTING guidelines

@github-actions[bot] commented on GitHub (Mar 1, 2024): Automatically locked because of our [CONTRIBUTING guidelines](https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md#issue-locking)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#12299