<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>514970</bug_id>
          
          <creation_ts>2026-01-23 11:27:49 +0000</creation_ts>
          <short_desc>Create index on ImageTagProperties.property</short_desc>
          <delta_ts>2026-04-25 16:34:01 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>digikam</product>
          <component>Database-Models</component>
          <version>8.8.0</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Terényi, Balázs">balazs</reporter>
          <assigned_to name="Digikam Developers">digikam-bugs-null</assigned_to>
          <cc>caulier.gilles</cc>
    
    <cc>zizka</cc>
          
          <cf_commitlink>https://invent.kde.org/graphics/digikam/-/commit/3b256067d8938838522c16ab7df05fe5c03f21c2</cf_commitlink>
          <cf_versionfixedin>9.1.0</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2487673</commentid>
    <comment_count>0</comment_count>
    <who name="Terényi, Balázs">balazs</who>
    <bug_when>2026-01-23 11:27:49 +0000</bug_when>
    <thetext>SUMMARY
Face confirmation is slow on my setup, so I checked what can I do to make it faster. I enabled mysql slow query log, and one query was always over 1s. So I added an index on ImageTagProperties.property column, which made the UI experience much better.

STEPS TO REPRODUCE
1. Work on People tab: tag assigment/confirmation is slow
2. Create the index in the database
3. The UI is much more responsive, tagging is noticeably faster. Didn&apos;t experienced any slowdown because of the new index in other workflows of Digikam.

OBSERVED RESULT
Tag confirmation/assignment on the People tab is slow.

EXPECTED RESULT
Tag confirmation/assignment on the People tab is faster.

SOFTWARE/OS VERSIONS
My digikam database engine is mysql on a NAS on gigabit LAN.

ADDITIONAL INFORMATION
MariaDB [digikam]&gt; SELECT tagid, COUNT(*) FROM ImageTagProperties LEFT JOIN Images ON Images.id=ImageTagProperties.imageid  WHERE ImageTagProperties.property=&apos;autodetectedFace&apos; AND Images.status=1 GROUP BY tagid;
+-------+----------+
| tagid | COUNT(*) |
+-------+----------+
|     1 |     6652 |
...
|   154 |       87 |
+-------+----------+
20 rows in set (1.34 sec)

MariaDB [digikam]&gt; create index imagetagproperties_property on ImageTagProperties (property(24));
Query OK, 0 rows affected (1.44 sec)
Records: 0  Duplicates: 0  Warnings: 0

MariaDB [digikam]&gt; SELECT tagid, COUNT(*) FROM ImageTagProperties LEFT JOIN Images ON Images.id=ImageTagProperties.imageid  WHERE ImageTagProperties.property=&apos;autodetectedFace&apos; AND Images.status=1 GROUP BY tagid;
+-------+----------+
| tagid | COUNT(*) |
+-------+----------+
|     1 |     6652 |
...
|   154 |       87 |
+-------+----------+
20 rows in set (0.92 sec)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2510778</commentid>
    <comment_count>1</comment_count>
    <who name="Maik Qualmann">metzpinguin</who>
    <bug_when>2026-04-19 04:45:25 +0000</bug_when>
    <thetext>*** Bug 519125 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2510787</commentid>
    <comment_count>2</comment_count>
    <who name="Maik Qualmann">metzpinguin</who>
    <bug_when>2026-04-19 06:41:21 +0000</bug_when>
    <thetext>Git commit ad5bb7d1da29dc6d90e4961d53afe79bbfa429b3 by Maik Qualmann.
Committed on 19/04/2026 at 06:40.
Pushed by mqualmann into branch &apos;master&apos;.

prepare database update to add ImageTagProperties index and a timezone field
Related: bug 519125, bug 517889, bug 510261, bug 495506, bug 491608, bug 485836, bug 251357

M  +46   -1    core/data/database/dbconfig.xml.cmake.in
M  +8    -0    core/libs/database/coredb/coredbschemaupdater.cpp

https://invent.kde.org/graphics/digikam/-/commit/ad5bb7d1da29dc6d90e4961d53afe79bbfa429b3</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2512098</commentid>
    <comment_count>3</comment_count>
    <who name="Maik Qualmann">metzpinguin</who>
    <bug_when>2026-04-25 14:41:12 +0000</bug_when>
    <thetext>Git commit 603698d3e1659a553fc4b79cc84c5b29f8fcbca7 by Maik Qualmann.
Committed on 25/04/2026 at 14:38.
Pushed by mqualmann into branch &apos;master&apos;.

prepare database update to add Indexes and timezone field
Related: bug 519125, bug 519389, bug 519390

M  +45   -13   core/data/database/dbconfig.xml.cmake.in

https://invent.kde.org/graphics/digikam/-/commit/603698d3e1659a553fc4b79cc84c5b29f8fcbca7</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2512106</commentid>
    <comment_count>4</comment_count>
    <who name="Maik Qualmann">metzpinguin</who>
    <bug_when>2026-04-25 16:34:01 +0000</bug_when>
    <thetext>Git commit 3b256067d8938838522c16ab7df05fe5c03f21c2 by Maik Qualmann.
Committed on 25/04/2026 at 16:33.
Pushed by mqualmann into branch &apos;master&apos;.

database update to add Indexes and timezone field to V17
Related: bug 519125, bug 519389, 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</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>