https://bugs.kde.org/show_bug.cgi?id=311542
--- Comment #3 from Alex Richardson <arichardson....@googlemail.com> --- Also the queries in line 5 and 6 of the filtered log could be merged into one: ... WHERE ( ( PartTable.name IN ( 'PLD:RFC822', 'COLLECTIONID', 'ATR:ErrorAttribute' ) OR substr( PartTable.name, 1, 4 ) = ( 'PLD:' ) OR substr( PartTable.name, 1, 4 ) = ( 'ATR:' ) ) AND ( PimItemTable.id = 148263 ) ) ORDER BY PimItemTable.id DESC ... WHERE ( ( PartTable.name IN ( 'PLD:RFC822', 'COLLECTIONID', 'PLD:HEAD' ) OR substr( PartTable.name, 1, 4 ) = ( 'PLD:' ) OR substr( PartTable.name, 1, 4 ) = ( 'ATR:' ) ) AND ( PimItemTable.id = 148263 ) ) ORDER BY PimItemTable.id DESC The only difference is the third item in the IN (...) clause. It could be simplified to ... WHERE ( ( PartTable.name = 'COLLECTIONID' OR substr( PartTable.name, 1, 4 ) = ( 'PLD:' ) OR substr( PartTable.name, 1, 4 ) = ( 'ATR:' ) ) AND ( PimItemTable.id = 148263 ) ) ORDER BY PimItemTable.id DESC Or maybe even ... WHERE ( ( PartTable.name = 'COLLECTIONID' OR substr( PartTable.name, 1, 4 ) IN ( 'PLD:', 'ATR:' ) ) AND ( PimItemTable.id = 148263 ) ) ORDER BY PimItemTable.id DESC which is more readable and could also be faster. -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ Kdepim-bugs mailing list Kdepim-bugs@kde.org https://mail.kde.org/mailman/listinfo/kdepim-bugs