[development] Slow query log
Moshe Weitzman
weitzman at tejasa.com
Wed Jan 3 16:14:17 UTC 2007
> One is the query from drupal_is_denied, which is run on each bootstrap.
> This query has been improved for Drupal 5, but I think it coul dbe
> further approved by doing away with the two LOWER()s in there in case
> you just check an IP.
i'm pretty sure you refer to this issue: http://drupal.org/node/83738
on the same topic, the main node_load() query takes on average 18ms on
groups site which seems too high given that groups isn't all that big a site
yet. this is a *very* frequent query. the SQL is:
SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment,
n.promote, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body,
r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data
FROM node n INNER JOIN users u ON u.uid = n.uid INNER JOIN node_revisions r
ON r.vid = n.vid
WHERE n.nid = <nid>
running EXPLAIN on it suggests that the JOIN with node_revisions is not
optimized. Perhaps someone else can look at EXPLAIN for this and suggest a fix?
More information about the development
mailing list