Summary: | Same SQL queries performed multiple times when fetching one email | ||
---|---|---|---|
Product: | [Frameworks and Libraries] Akonadi | Reporter: | Alex Richardson <arichardson.kde> |
Component: | general | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED UNMAINTAINED | ||
Severity: | normal | CC: | Martin |
Priority: | NOR | ||
Version: | 4.10 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
The MySQL log
The same log piped through sort and uniq -c |
Description
Alex Richardson
2012-12-11 20:06:44 UTC
Created attachment 75787 [details]
The MySQL log
Created attachment 75788 [details]
The same log piped through sort and uniq -c
As you can see most operations are being performed three times, I think it should be possible to reduce that
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. This bug has only been reported for versions older than KDEPIM 4.14 (at most akonadi-1.3). Can anyone tell if this bug still present? If noone confirms this bug for a recent version of akonadi (part of KDE Applications 15.08 or later), it gets closed in about three months. Just as announced in my last comment, I close this bug. If you encounter it again in a recent version (at least 5.0 aka 15.08), please open a new one unless it already exists. Thank you for all your input. |