View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0006277 | SOGo | Backend General | public | 2026-12-02 08:31 | 2026-12-02 08:33 |
| Reporter | OlivierP | Assigned To | |||
| Priority | normal | Severity | minor | Reproducibility | have not tried |
| Status | new | Resolution | open | ||
| Platform | [Server] Linux | OS | Debian | OS Version | 8 (Jessie) |
| Product Version | 5.12.13 | ||||
| Summary | 0006277: Performance: missing indexes on sogo_quick_appointment cause full table scans on calendar views | ||||
| Description | Summary Calendar views (week/month) become very slow when the sogo_quick_appointment table grows beyond 0000082:0000050 000 rows. The root cause is that the official schema ships with no indexes on the date columns used by every calendar range query. Environment
Root cause The official init script (Scripts/mysql-utf8mb4.sql) defines sogo_quick_appointment with only a composite primary key: PRIMARY KEY (c_folder_id, c_name) However, SOGoAppointmentFolder.m generates range queries filtered on c_startdate, c_enddate, and c_cycleenddate for every calendar view: -- non-recurring events -- recurring events Without indexes on these columns, every view triggers a full table scan. EXPLAIN confirms: type=ALL key=NULL rows=149840 Extra=Using where A secondary issue: sogo_folder_info has no index on c_path2, causing an additional full scan (4 640 rows) on every user folder lookup. Proposed fix: Add the following indexes to the init script and to a migration script: ALTER TABLE sogo_quick_appointment Thanks a lot | ||||
| Tags | No tags attached. | ||||