I just upgraded my D6 site to D7 including the workflow module. Except for one error (see #2265147: After upgrade there is some error: Column not found: 1054 Unknown column 'base.name' in 'field list') the upgrade seems to work. But creating a table view with either "Workflow current: New state name" or "Workflow states (deprecated): Current state name" slows down my site extremely and makes mysqld use almost all my CPU.

In mysql, SHOW FULL PROCESSLIST shows me some queries that won't disappear until I restart the mysql server. They look like this:

     Id: 850
   User: [USER]
   Host: localhost
     db: [DB]
Command: Query
   Time: 932
  State: Sending data
   Info: SELECT COUNT(*) AS expression
FROM 
(SELECT 1 AS expression
FROM 
node node
LEFT JOIN workflow_node workflow_node ON node.nid = workflow_node.nid
LEFT JOIN workflow_states workflow_states ON workflow_node.sid = workflow_states.sid
LEFT JOIN workflow_node_history workflow_node_current ON ( SELECT max(hid) FROM workflow_node_history
                            where nid = node.nid
                            and   sid != old_sid ) = workflow_node_current.hid
WHERE (( (node.status = '1') ))) subquery

Comments

yan created an issue. See original summary.

yan’s picture

Status: Active » Closed (cannot reproduce)

Closing this because it might have to do with some of my settings.

johnv’s picture

Status: Closed (cannot reproduce) » Closed (works as designed)

You scared me :-)

GWPT_James’s picture

Yan, could you comment a bit on what you did to fix the problem in your own settings? I'm having this problem. My workflow views have slowed down greatly over the last few months, and it's gotten unbearable as of late.

Thanks.

johnv’s picture

Status: Closed (works as designed) » Active
johnv’s picture

@GWPT_James, which version do you use? an extra index on Node ID is added in al new release of this module.

johnv’s picture

Title: After upgrade workflow uses all my CPU and slows down the site extremely » After upgrade from D6 to D7, workflow uses all my CPU and slows down the site extremely
Status: Active » Closed (outdated)

Closing this issue.
I guess there will be no more migrations from D6 to D7.