mirror of
https://github.com/go-gitea/gitea.git
synced 2025-04-28 11:45:15 +00:00
Two SQLs are very slow when `action` table have over 5M records. ``` database duration=1.8881s db.sql="SELECT created_unix DIV 900 * 900 AS timestamp, count(user_id) as contributions FROM `action` WHERE user_id=? AND act_user_id=? AND (created_unix > ?) GROUP BY timestamp ORDER BY timestamp" database duration=1.5408s db.sql="SELECT count(*) FROM `action` WHERE (user_id = ?) AND (is_deleted = ?)" ``` This will cache the count for the first loading or when the activities changed. |
||
---|---|---|
.. | ||
action_list.go | ||
action_test.go | ||
action.go | ||
main_test.go | ||
notification_list.go | ||
notification_test.go | ||
notification.go | ||
repo_activity.go | ||
statistic.go | ||
user_heatmap_test.go | ||
user_heatmap.go |