diff --git a/CHANGELOG.md b/CHANGELOG.md index 9dc48ef54..348d412f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,7 @@ The format is a modified version of [Keep a Changelog](https://keepachangelog.co - Fixed library entries without a date added getting their last update time as date added when updating from v0.20.x ([@AntsyLich](https://github.com/AntsyLich)) - Fixed the app closing when WebView's page process crashed ([@AntsyLich](https://github.com/AntsyLich)) - Fixed installing or updating an extension sometimes cancelling the install of another one ([@AntsyLich](https://github.com/AntsyLich)) +- Fixed updating from v0.20.x taking up to hours on libraries with many duplicate entries ([@AntsyLich](https://github.com/AntsyLich)) ## [v0.21.0] - 2026-10-12 ### Added diff --git a/data/src/main/sqldelight/tachiyomi/migrations/17.sqm b/data/src/main/sqldelight/tachiyomi/migrations/17.sqm index b0d945b5d..55bd90652 100644 --- a/data/src/main/sqldelight/tachiyomi/migrations/17.sqm +++ b/data/src/main/sqldelight/tachiyomi/migrations/17.sqm @@ -31,6 +31,9 @@ WHERE (source, url) IN ( HAVING count(*) > 1 ); +-- Moving the chapters looks each one's entry up here, which without an index scans the whole table per chapter +CREATE INDEX duplicate_mangas_id_index ON duplicate_mangas(_id); + UPDATE mangas SET favorite_at = merged.favorite_at, initialized = merged.initialized,