Conversation
WalkthroughAdds SAK-51950 index-creation snippets to MySQL and Oracle 23.4→23.5 conversion SQL scripts, creating an index on CALENDAR_EVENT over CALENDAR_ID, RANGE_START, RANGE_END, and EVENT_START, with start/end markers. Changes
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (3)
docs/conversion/sakai_23_4-23_5_mysql_conversion.sql (1)
2-5: Make DDL rerunnable and reduce lock timeConsider ALTER TABLE with online options and guard for existing index to avoid failures during repeated conversions and to minimize blocking.
Apply if compatible with your supported MySQL version:
-CREATE INDEX CALENDAR_EVENT_CID_RSTART_REND_ESTART - ON CALENDAR_EVENT (CALENDAR_ID, RANGE_START, RANGE_END, EVENT_START); +-- Create online if possible; no-op if already present +-- (verify support for ALGORITHM/LOCK in your MySQL version) +ALTER TABLE CALENDAR_EVENT + ADD INDEX CALENDAR_EVENT_CID_RSTART_REND_ESTART (CALENDAR_ID, RANGE_START, RANGE_END, EVENT_START) + ALGORITHM=INPLACE, LOCK=NONE;Optionally precede with a check via INFORMATION_SCHEMA.STATISTICS in operational runbooks if you prefer to keep the SQL plain.
docs/conversion/sakai_23_4-23_5_oracle_conversion.sql (2)
2-5: Add ONLINE build and gather statsTo cut disruption during upgrades and ensure good plans, build the index ONLINE and collect stats post‑create.
Proposed adjustment:
-CREATE INDEX CAL_EVENT_CID_RST_REND_EST - ON CALENDAR_EVENT (CALENDAR_ID, RANGE_START, RANGE_END, EVENT_START); +CREATE INDEX CAL_EVENT_CID_RST_REND_EST + ON CALENDAR_EVENT (CALENDAR_ID, RANGE_START, RANGE_END, EVENT_START) + ONLINE; +BEGIN + DBMS_STATS.GATHER_INDEX_STATS(ownname => USER, indname => 'CAL_EVENT_CID_RST_REND_EST'); +END; +/
2-5: Minor: unify index naming across dialectsNaming differs (CALENDAR_EVENT_CID_RSTART_REND_ESTART vs CAL_EVENT_CID_RST_REND_EST). Aligning helps ops/searchability in runbooks. Not blocking.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
docs/conversion/sakai_23_4-23_5_mysql_conversion.sql(1 hunks)docs/conversion/sakai_23_4-23_5_oracle_conversion.sql(1 hunks)
🔇 Additional comments (1)
docs/conversion/sakai_23_4-23_5_mysql_conversion.sql (1)
2-5: Confirm index column order vs slow query planIf the slow path filters by CALENDAR_ID and ranges on RANGE_START/RANGE_END but orders by EVENT_START, consider leading EVENT_START after CALENDAR_ID to enable range scan + order without filesort. Please post the representative SQL and EXPLAIN to verify whether (CALENDAR_ID, RANGE_START, RANGE_END, EVENT_START) is optimal vs (CALENDAR_ID, EVENT_START, RANGE_START, RANGE_END) or a secondary index (CALENDAR_ID, EVENT_START).
|
when this is merged to branches will update this |
Summary by CodeRabbit