| Summary: | MariaDB/MySQL: missing index on Images.status causes full table scan on tag count, calendar, and People panel queries | ||
|---|---|---|---|
| Product: | [Applications] digikam | Reporter: | Ondrej Zizka <zizka> |
| Component: | Database-Schema | Assignee: | Digikam Developers <digikam-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | caulier.gilles |
| Priority: | NOR | ||
| Version First Reported In: | 9.0.0 | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/graphics/digikam/-/commit/3b256067d8938838522c16ab7df05fe5c03f21c2 | Version Fixed/Implemented In: | 9.1.0 |
| Sentry Crash Report: | |||
|
Description
Ondrej Zizka
2026-04-25 05:39:13 UTC
I did these tweaks and the UI performance issues almost completely disappeared. Things that took 15 seconds are now instant. I highly recommend prioritizing this for 9.1. Can you confirm with 9.1.0 pre-release ? And what's about sqlite database ? (That said, IMHO it would still be better to detach the UI from the SQL queries and make it completely asynchronous, and 'cheating' a bit when loading stuff - not everything needs to be computed for the entire collection, the UI will be completely fine loading just the first 200 items, on whichever page. Doesn't even need to be consistent for the first 5 seconds, so most often needed data can be cached and re-read eventually and applied to the UI.) > Can you confirm with 9.1.0 pre-release ?
Confirm what exactly? What is the status in 9.1? Are the indexes already there? Or shall I confirm that the indexes are applicable this way?
Regarding SQLite, IDK what's it's schema capabilities, IIRC it doesn't have the VARCHAR(limit) syntax, right? So I guess the schema would need to differ conditionally, if that is applicable. I hope it is.
(Sorry, mixing the two index-related tickets together - the VARCHAR(limit) note is for https://bugs.kde.org/show_bug.cgi?id=519390 ). With 9.1.0, Maik has already started few days ago to patch the database schema. So it will be useful to double check in a few days if this problem is reproducible with the 9.1.0 pre-release available here : https://files.kde.org/digikam/ The Sqlite and Mysql/MariaDB schema rules are managed differently than the backend. You will find the code here : - Core database schema updater : https://invent.kde.org/graphics/digikam/-/blob/master/core/libs/database/coredb/coredbschemaupdater.cpp?ref_type=heads Note: we have the same kind of classes for all other database (similarity, faces, thumbnails, etc...) - Database SQL rules: https://invent.kde.org/graphics/digikam/-/blob/master/core/data/database/dbconfig.xml.cmake.in?ref_type=heads Gilles Caulier Git commit 603698d3e1659a553fc4b79cc84c5b29f8fcbca7 by Maik Qualmann. Committed on 25/04/2026 at 14:38. Pushed by mqualmann into branch 'master'. prepare database update to add Indexes and timezone field Related: bug 519125, bug 514970, bug 519390 M +45 -13 core/data/database/dbconfig.xml.cmake.in https://invent.kde.org/graphics/digikam/-/commit/603698d3e1659a553fc4b79cc84c5b29f8fcbca7 Git commit 3b256067d8938838522c16ab7df05fe5c03f21c2 by Maik Qualmann. Committed on 25/04/2026 at 16:33. Pushed by mqualmann into branch 'master'. database update to add Indexes and timezone field to V17 Related: bug 519125, bug 514970, bug 519390 FIXED-IN: 9.1.0 M +4 -4 NEWS M +8 -9 core/data/database/dbconfig.xml.cmake.in M +1 -1 core/libs/database/coredb/coredbschemaupdater.cpp https://invent.kde.org/graphics/digikam/-/commit/3b256067d8938838522c16ab7df05fe5c03f21c2 I'm (belatedly) confirming that these change works with DigiKam 9.1 nightly build from 2026-04-30. |