Files
pgsql-jellyfin/docs/WEEKLY_TRACKING.md
T
wjones 78c8d4256c Docs reorg, config refactor, and ItemValues index fix
- Moved all documentation to docs/ and updated README with categorized links and new docs/INDEX.md
- Added HOW_TO_SWITCH_DATABASE.md and several new analysis/action docs
- Introduced db-config.ps1 for centralized DB config; all scripts now use it for easy DB switching
- Added db-quick.ps1 for interactive diagnostics and index management
- Updated Add-All-Indexes.bat to use db-config.ps1
- Added Fix-ItemValues-Performance.ps1 to create 3 critical indexes on ItemValues, addressing 1.3B row seq scan issue
- Updated performance_indexes.sql with new ItemValues indexes and ANALYZE
- Updated diagnostics.sql and database_report.txt for improved output and clarity
- All scripts and docs now reference the new config and index optimization workflow
2026-02-28 16:23:43 -05:00

200 lines
4.0 KiB
Markdown

# 📊 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: