mirror of
https://github.com/beilunyang/moemail.git
synced 2026-04-25 03:25:47 +03:00
[GH-ISSUE #49] 性能优化建议 #32
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/moemail#32
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Selenium39 on GitHub (May 20, 2025).
Original GitHub issue: https://github.com/beilunyang/moemail/issues/49
当前
worker/cleanup.ts定时清理邮箱和邮件会导致大量的读取行,很容易超过cloudflare的5m限制。建议一:当前message已经设置了级联删除,删除邮箱会自动删除邮件,无需再手动删除邮件
建议二:由于不用手动删除邮件,所以不用先查询出email id再删除了,直接根据expires_at删除邮箱
建议三:email表给expires_at增加索引,message表给emailId增加索引
@Selenium39 commented on GitHub (May 21, 2025):
优化后效果,Delete 的Rows read明显下降
