Thanks Martin,
I tried to increase the INNODB buffer as suggested with no success.
And btw, I do not have a performance problem, KMail is hanging forever.
Someone mentioned
https://cgit.kde.org/akonadi.git/commit/?h=Applications/
16.12&id=d42f94701f38c26cf3439727b50ee73cf0d09bee
Not sure how fast it will make it into Debian.
And I am not sure if this addresses my problem... I now have several emails
that produce the issue just by clicking on them.
KMail evolved from a once very stable and fast mail client to a almost
unusable one. Each iteration/bugfix comes with new bugs that are even worse
than the ones fixed. My conclusion after years of suffering: KMail does not
have enough dev resources - it is literally dead and meanwhile lacks many
features that other mail client had for years (one badly missing and requested
years ago: Saving encrypted messages unencrypted locally).
Tim (really frustrated at the moment)