https://bugs.kde.org/show_bug.cgi?id=514970

            Bug ID: 514970
           Summary: Create index on ImageTagProperties.property
    Classification: Applications
           Product: digikam
      Version First 8.8.0
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Tags-Engine
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

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'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]> SELECT tagid, COUNT(*) FROM ImageTagProperties LEFT JOIN
Images ON Images.id=ImageTagProperties.imageid  WHERE
ImageTagProperties.property='autodetectedFace' AND Images.status=1 GROUP BY
tagid;
+-------+----------+
| tagid | COUNT(*) |
+-------+----------+
|     1 |     6652 |
...
|   154 |       87 |
+-------+----------+
20 rows in set (1.34 sec)

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

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

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to