By jcisio on
Hello,
Just migrate a site to Drupal. About 15k nodes, 20k users. I use the workflow module, that creates a node_access with 80k+ rows. A query takes 40s to complete, and when I close my site, run those queries myself, each takes 3-4s :( Any idea?
SELECT COUNT(*) FROM (SELECT DISTINCT node.nid AS nid
FROM node node
LEFT JOIN node_counter node_counter ON node.nid = node_counter.nid
INNER JOIN node_access na ON na.nid = node.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 2 AND na.realm = 'workflow_access') OR (na.gid = 3 AND na.realm = 'workflow_access') OR (na.gid = 4 AND na.realm = 'workflow_access') OR (na.gid = 5 AND na.realm = 'workflow_access') OR (na.gid = 64 AND na.realm = 'workflow_access_owner'))) AND ( (node.status <> 0) AND (node_counter.totalcount > 0) AND (node_counter.timestamp >= 1265987728-259200) AND (node.vid IN (
SELECT tn.vid FROM term_node tn
LEFT JOIN term_hierarchy th ON th.tid = tn.tid
LEFT JOIN term_hierarchy th1 ON th.parent = th1.tid
WHERE tn.tid = 80
OR th1.tid = 80
)) AND (node.nid != 15243)
)) count_alias;
Comments
Just another query #
Just another query
OK, don't bother. Just did
OK, don't bother. Just did some core hack and Views hack, node_access's gone with there're other problems. I imagine that I need to work more.
With Views and Panels, the number of MySQL queries for each pageview is:
While the number of queries isn't important: most of them finish in less than 1 ms, others in a few ms, those numbers make me really surprise. Memory usage is only about 4-10 MB however.
Could you share a little bit
Could you share a little bit about what you did.
I'm also using workflow and am having lots of performance issues.
I don't hack any, just don't
I don't hack any, just don't use any node access module, so that the node_access table has only one row. Try to live without workflow access module :)