-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Optimize heatmap query #33853
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimize heatmap query #33853
Conversation
are those index names consistent with previous indexes? maybe better to spell out the column names wholly. |
ce57b3b will follow previous index naming pattern. |
I mean why not use |
All other indexes in this table uses a first character of the columns in this index. |
* giteaofficial/main: [skip ci] Updated translations via Crowdin Only use prev and next buttons for pagination on user dashboard (go-gitea#33981) update jwt and redis packages (go-gitea#33984) [skip ci] Updated translations via Crowdin Improve oauth2 error handling (go-gitea#33969) [skip ci] Updated translations via Crowdin Cover `go.mod` and `go.sum` in `.editorconfig` (go-gitea#33960) Drop timeout for requests made to the internal hook api (go-gitea#33947) Fix file name could not be searched if the file was not a text file when using the Bleve indexer (go-gitea#33959) Fix oauth2 auth and UI (go-gitea#33961) Allow filtering issues by any assignee (go-gitea#33343) Optimize total count of feed when loading activities in user dashboard. (go-gitea#33841) Extract code to their own functions for push update (go-gitea#33944) Optimize heatmap query (go-gitea#33853)
When there are over 5M records on
action
table, the heatmap on dashboard is very slow as below SQL.This PR add a new index for
action
table with columnsuser_id
,act_user_id
andcreated_unix
so that this query will become about 6 times faster than before.