What steps will reproduce the problem?
1. Search for more than 1 xmp attributes in simple SQL
2.
3.
What is the expected output? What do you see instead?
The generated SQL is wrong which has a huge impact on performance:
The join condition:
INNER JOIN xmp ON files.id = xmp.id_file
is inserted multipe times (probably once per attribute)
What version of the product are you using? On what operating system?
JPhotoTagger 0.24.6
Java Runtime Environment version: 1.6.0_19
on Windows XP
Please provide any additional information below.
The workaround is to use custom SQL.
Example corrected SQL:
SELECT DISTINCT files.filename FROM files
INNER JOIN exif ON files.id = exif.id_file
INNER JOIN xmp ON files.id = xmp.id_file
INNER JOIN xmp_dc_subject ON xmp.id = xmp_dc_subject.id_xmp
INNER JOIN dc_subjects ON xmp_dc_subject.id_dc_subject = dc_subjects.id
WHERE dc_subjects.subject = 'Nele'
AND exif.exif_date_time_original > '2010-01-01'
AND exif.exif_date_time_original < '2010-10-01'
AND xmp.rating > 2
Original issue reported on code.google.com by u...@eulen-steffen.de on 21 Mar 2012 at 7:10
Original issue reported on code.google.com by
u...@eulen-steffen.de
on 21 Mar 2012 at 7:10