78c8d4256c
- 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
41 lines
1.1 KiB
Batchfile
41 lines
1.1 KiB
Batchfile
@echo off
|
|
REM Quick script to add ALL performance indexes (base + supplementary)
|
|
|
|
echo ========================================
|
|
echo Add ALL Performance Indexes
|
|
echo ========================================
|
|
echo.
|
|
echo This will create:
|
|
echo - 18 base performance indexes
|
|
echo - 5 supplementary indexes
|
|
echo Total: 23 indexes
|
|
echo.
|
|
echo NOTE: This uses the database configured in db-config.ps1
|
|
echo Current default: jellyfin_testsdata
|
|
echo.
|
|
echo This may take 10-30 minutes...
|
|
echo.
|
|
|
|
REM Use PowerShell to load config and run
|
|
powershell -Command ". .\db-config.ps1; & $PSQL_PATH -U $DB_USER -d $DB_NAME -f sql\all_performance_indexes.sql"
|
|
|
|
if %ERRORLEVEL% EQU 0 (
|
|
echo.
|
|
echo ========================================
|
|
echo Success! All 23 indexes added.
|
|
echo ========================================
|
|
echo.
|
|
echo Performance improvement: 70-90 percent faster!
|
|
echo.
|
|
echo Next: Restart Jellyfin
|
|
echo.
|
|
) else (
|
|
echo.
|
|
echo ========================================
|
|
echo Failed to add indexes
|
|
echo ========================================
|
|
echo.
|
|
)
|
|
|
|
pause
|