https://bugs.kde.org/show_bug.cgi?id=451620
--- Comment #6 from Erik Quaeghebeur <bugs.kde....@e3q.eu> --- (In reply to Andreas Sturmlechner from comment #5) > Erik, did you have a chance to test this with akonadi-24.05.2 and can we > consider this fixed? No, it is not fixed, I hit it again with 24.08.1. I again delved into the code. The function is at https://invent.kde.org/pim/akonadi/-/blob/master/src/server/storagejanitor.cpp#L300. There, as before, a list of orphan items is created, at https://invent.kde.org/pim/akonadi/-/blob/master/src/server/storagejanitor.cpp#L309. Then this list is used to create a second query in which the possibly too large list is injected, at https://invent.kde.org/pim/akonadi/-/blob/master/src/server/storagejanitor.cpp#L322. The right approach is, AFAIU: 1. create a query to count how many orphans there are; 2. there are orphans, to create a second query again selecting the orphans and assigns them to the/a lost+found collection. Do not save the orphans in a list. SQL engines will be far more efficient by using direct queries whenever you can and not passing through one's own data structures. -- You are receiving this mail because: You are watching all bug changes.