Closed (fixed)
Project:
Google Sitemap
Version:
4.7.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Nov 2007 at 09:31 UTC
Updated:
30 Nov 2007 at 19:51 UTC
gsitemap queries are very slow queries eating up my CPU...
# Time: 071106 22:56:58
# User@Host: cheatmaster[cheatmaster] @ localhost []
# Query_time: 359 Lock_time: 0 Rows_sent: 9090 Rows_examined: 95122758
SELECT n.nid, n.type, n.status, n.promote, n.changed, g.previously_changed, g.priority_override FROM node n LEFT JOIN gsitemap g ON n.nid = g.nid LEFT JOIN url_alias u ON src = CONCAT('node/',n.nid) WHERE n.status > 0 AND (g.priority_override >= 0 OR g.priority_override IS NULL) AND n.type NOT IN ('') AND n.nid >= 0 AND n.nid < 10000;
# Time: 071106 23:02:04
# User@Host: cheatmaster[cheatmaster] @ localhost []
# Query_time: 426 Lock_time: 0 Rows_sent: 9090 Rows_examined: 95122758
SELECT n.nid, n.type, n.status, n.promote, n.changed, g.previously_changed, g.priority_override FROM node n LEFT JOIN gsitemap g ON n.nid = g.nid LEFT JOIN url_alias u ON src = CONCAT('node/',n.nid) WHERE n.status > 0 AND (g.priority_override >= 0 OR g.priority_override IS NULL) AND n.type NOT IN ('') AND n.nid >= 0 AND n.nid < 10000;
# Time: 071106 23:17:12
# User@Host: cheatmaster[cheatmaster] @ localhost []
# Query_time: 83 Lock_time: 0 Rows_sent: 1428 Rows_examined: 14955444
use cheats;
SELECT n.nid, n.type, n.status, n.promote, n.changed, g.previously_changed, g.priority_override FROM node n LEFT JOIN gsitemap g ON n.nid = g.nid LEFT JOIN url_alias u ON src = CONCAT('node/',n.nid) WHERE n.status > 0 AND (g.priority_override >= 0 OR g.priority_override IS NULL) AND n.type NOT IN ('') AND n.nid >= 10000 AND n.nid < 20000;
# Time: 071106 23:22:59
# User@Host: cheatmaster[cheatmaster] @ localhost []
# Query_time: 333 Lock_time: 0 Rows_sent: 9090 Rows_examined: 95159106
SELECT n.nid, n.type, n.status, n.promote, n.changed, g.previously_changed, g.priority_override FROM node n LEFT JOIN gsitemap g ON n.nid = g.nid LEFT JOIN url_alias u ON src = CONCAT('node/',n.nid) WHERE n.status > 0 AND (g.priority_override >= 0 OR g.priority_override IS NULL) AND n.type NOT IN ('') AND n.nid >= 0 AND n.nid < 10000;
Comments
Comment #1
ednique commentedIn case you are wondering... I have 10.553 nodes
Comment #2
darren ohThis has been solved in the 5.x versions. A patch for 4.7.x would be welcome.
Comment #3
ednique commentedI simply removed
LEFT JOIN {url_alias} u ON src = CONCAT('node/', n.nid)as it is actually not used and its this part that causes the tremendous delay...Comment #4
darren ohFixed in CVS commit 87656.
Comment #5
darren ohComment #6
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.