https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32719

            Bug ID: 32719
           Summary: db_revs 210600001 can take a long time
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Database
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]

I did an upgrade from 20.11.06 to 22.05.08 last night, and db_rev 210600001
(bug 28489) took something like an hour. The problem was probably that the
sessions table was huge, and should have been cleaned regularly. But it wasn't. 

Here is what the update does: 

        $dbh->do('DELETE FROM sessions');
        $dbh->do('ALTER TABLE sessions MODIFY a_session LONGBLOB NOT NULL');

I expected the delete to be quick and altering an empty table should also be
quick. But it wasn't. "show processlist" showed this for a long time: 

copy to tmp table | ALTER TABLE sessions MODIFY a_session LONGBLOB NOT NULL

I wonder if the problem is that the DELETE and the ALTER is in the same
transaction? Which means the "deleted" data needs to be kept track of, while
the "alter" is running? Maybe this could be made more efficient for others with
a large sessions table?

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to