I have solved it myself!
Made a fresh install and then compare gl_stories table between new database and upgraded one.
The fresh install had the following in the gl_stories table:
PHP Formatted Code
`text_version` tinyint
(2) unsigned NOT
NULL DEFAULT '1',
The upgraded database had the following:
PHP Formatted Code
`text_version` tinyint
(2) NOT
NULL DEFAULT '1',
So, the trick was to alter the filed and add
unsigned and magically everything works wonderful now. Instead of a minute, it took only 1.85 seconds in the test server. 30 times better just because a small change in the database.
I'm going to do more testing before upgrading my production website, but I think it's very relevant that this small omision during the upgrade makes things really awful. Where should I properly post this bug?
--
https://www.AlcanceLibre.org/
https://blog.AlcanceLibre.org/
La libertad del conocimiento al alcance de quien la busca.