https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6444

           Summary: tok_touch_all update forces full table scan, kills
                    performance.
           Product: Spamassassin
           Version: 3.3.1
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: Plugins
        AssignedTo: [email protected]
        ReportedBy: [email protected]


The current implementation of the atime column update in tok_touch_all uses an
"IN" statement for the token field. Given that the bayes_token table has
id,token as the primary key, using the IN statement in this way kills
performance in an exponential manner.

It also is the reason why so many people have been experiencing the serious
deadlocking issues reported across so many web sites and chat forums.

This can be easily re-worked to use the very strong id,token primary key by
breaking out the loop to a higher level and converting the where into id = ?
and token = ?


I have done this and the patch will be uploaded the amended file as an
attachment.

The performance boosts is huge and gets rid of the deadlocking problem that is
plaguing so many people.

-- 
Configure bugmail: 
https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to