# 📊 Weekly Index Usage Tracking ## Week 1: Baseline (Starting 2026-02-28) ### Monday **Date**: 2026-02-28 **Jellyfin Usage:** - [ ] Browsed Recently Added - [ ] Filtered by Genre - [ ] Searched for actors/directors - [ ] Navigated library folders - [ ] Watched content **Notes**: ### Tuesday **Date**: ___________ **Jellyfin Usage:** - [ ] Browsed Recently Added - [ ] Filtered by Genre - [ ] Searched for actors/directors - [ ] Navigated library folders - [ ] Watched content **Notes**: ### Wednesday (Mid-Week Check) **Date**: ___________ **Run Quick Check:** ```powershell & "C:\Program Files\PostgreSQL\18\bin\psql.exe" -U jellyfin -d jellyfin -c "SELECT indexname, idx_scan, idx_tup_read FROM pg_stat_user_indexes WHERE schemaname = 'library' AND indexname LIKE 'idx_%' ORDER BY indexname;" ``` **Results:** - idx_baseitems_datecreated_filtered: _____ uses - idx_baseitems_topparentid_isfolder: _____ uses - idx_baseitems_type_isvirtualitem_topparentid: _____ uses - idx_itemvaluesmap_itemvalueid_itemid: _____ uses - idx_activitylogs_userid_datecreated: _____ uses **Notes**: ### Thursday **Date**: ___________ **Jellyfin Usage:** - [ ] Browsed Recently Added - [ ] Filtered by Genre - [ ] Searched for actors/directors - [ ] Navigated library folders - [ ] Watched content **Notes**: ### Friday **Date**: ___________ **Jellyfin Usage:** - [ ] Browsed Recently Added - [ ] Filtered by Genre - [ ] Searched for actors/directors - [ ] Navigated library folders - [ ] Watched content **Notes**: ### Weekend **Date**: ___________ **Jellyfin Usage:** - [ ] Browsed Recently Added - [ ] Filtered by Genre - [ ] Searched for actors/directors - [ ] Navigated library folders - [ ] Watched content **Notes**: --- ## End of Week Analysis **Date**: ___________ ### Run Full Diagnostics: ```powershell & "C:\Program Files\PostgreSQL\18\bin\psql.exe" -U jellyfin -d jellyfin -f sql\diagnostics.sql > diagnostics_week1.txt ``` ### Compare to Baseline (2026-02-28): | Metric | Baseline | Week 1 | Change | |--------|----------|--------|--------| | idx_baseitems_datecreated_filtered uses | 0 | _____ | _____ | | idx_itemvaluesmap_itemvalueid_itemid uses | 10 | _____ | _____ | | ItemValues seq_scan | 226,121 | _____ | _____ | | ItemValues seq_tup_read | 1,313,356,213 | _____ | _____ | ### Observations: ### Questions: 1. Which indexes showed increased usage? 2. Are there still tables with high sequential scans? 3. Any new slow queries? 4. Did you notice performance improvements in Jellyfin? --- ## Recommendations for Week 2: Based on Week 1 results: - [ ] Keep indexes that show good usage (>100 uses) - [ ] Monitor indexes with moderate usage (10-100 uses) - [ ] Consider removing indexes with 0-10 uses - [ ] Create new indexes for remaining bottlenecks --- ## Week 2: Optimization (Starting ___________) ### Actions Taken: ### Monday-Friday: (Repeat tracking format from Week 1) --- ## Week 3-4: Long-term Monitoring ### Weekly Summary Format: **Week 3** (Date: ___________) - Diagnostics run: [ ] - Index usage: _____ - Performance notes: _____ **Week 4** (Date: ___________) - Diagnostics run: [ ] - Index usage: _____ - Performance notes: _____ --- ## 30-Day Review **Date**: ___________ ### Final Index Status: | Index Name | Total Uses | Keep/Remove | Reason | |------------|------------|-------------|--------| | idx_baseitems_datecreated_filtered | _____ | [ ] Keep [ ] Remove | _____ | | idx_baseitems_topparentid_isfolder | _____ | [ ] Keep [ ] Remove | _____ | | idx_baseitems_type_isvirtualitem_topparentid | _____ | [ ] Keep [ ] Remove | _____ | | idx_itemvaluesmap_itemvalueid_itemid | _____ | [ ] Keep [ ] Remove | _____ | | idx_activitylogs_userid_datecreated | _____ | [ ] Keep [ ] Remove | _____ | ### Overall Performance Improvement: - [ ] Significantly faster (50%+) - [ ] Moderately faster (20-50%) - [ ] Slightly faster (10-20%) - [ ] No noticeable change ### Next Steps: --- ## Notes & Observations Use this space for any additional observations, weird behaviors, or questions: