Files
pgsql-jellyfin/docs/QUICK_PUBLISH_REFERENCE.md
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

128 lines
2.3 KiB
Markdown

# 🚀 Quick Reference: Publish Jellyfin with SQL Files
## One Command Solution
```powershell
.\publish-with-sql.ps1
```
That's it! Everything is handled automatically.
---
## What Gets Published
```
publish/
├── jellyfin.exe
├── ... (all DLLs and files)
└── sql/ ← SQL files included!
├── all_performance_indexes.sql ← Main performance script
├── add_base_performance_indexes.sql
├── diagnostics.sql
└── schema_init/
└── 10_create_supplementary_indexes.sql
```
---
## Verify After Publish
```powershell
# Check if SQL files are present
Test-Path "Jellyfin.Server\bin\Release\net11.0\publish\sql\all_performance_indexes.sql"
# Returns: True ✅
# List all SQL files
ls "Jellyfin.Server\bin\Release\net11.0\publish\sql" -Recurse
```
---
## Manual Method (If Needed)
```powershell
# 1. Publish
dotnet publish Jellyfin.Server\Jellyfin.Server.csproj -c Release
# 2. Copy SQL files
.\copy-sql-files.ps1
```
---
## What Happens on Startup
```
Jellyfin starts
Checks if performance indexes exist
Missing? → Loads sql/all_performance_indexes.sql
Creates 23 performance indexes automatically
✅ Database optimized!
```
---
## Logs You'll See
```
[INF] Found 0/9 base performance indexes. Applying SQL script...
[INF] Executing performance indexes script: .../sql/all_performance_indexes.sql
[INF] Performance indexes created successfully. Database is now fully optimized.
```
---
## Files Created for You
1. **`publish-with-sql.ps1`** - Automated publish + copy script ⭐
2. **`copy-sql-files.ps1`** - Manual copy script
3. **`Jellyfin.Server/sql/`** - SQL files directory
---
## Troubleshooting
### SQL files not in publish output?
```powershell
# Run the publish script
.\publish-with-sql.ps1
```
### Already published without SQL files?
```powershell
# Just copy them
.\copy-sql-files.ps1
```
### Need to verify?
```powershell
# Check the files
dir "Jellyfin.Server\bin\Release\net11.0\publish\sql"
```
---
## Quick Test
```powershell
# 1. Publish
.\publish-with-sql.ps1
# 2. Run
cd Jellyfin.Server\bin\Release\net11.0\publish
.\jellyfin.exe
# 3. Check logs - should see "Performance indexes created successfully"
```
---
**That's all you need to know!** 🎉
Use `.\publish-with-sql.ps1` and you're done!