In the database, 15000 nodes and a bunch of content types. Attempting to bulk generate new url aliases 50 at a time would not complete. The sql taking the longest:

$query = "SELECT nid, type, title, uid, created, src, dst, vid FROM {node} LEFT JOIN {url_alias} ON CONCAT('node/', nid) = src WHERE src IS NULL ". $type_where;
CommentFileSizeAuthor
#1 234374.patch1.18 KBaufumy

Comments

aufumy’s picture

StatusFileSize
new1.18 KB

Altered the sql to use " NOT IN " instead of a LEFT JOIN and WHERE src IS NULL

On my local the difference was 13 secs instead of 4 mins.

Since src, dst will always be NULL, don't see a need for the assigning of NULLs.

greggles’s picture

Status: Active » Closed (duplicate)

Thanks for the idea. Please see http://drupal.org/node/212327

A couple of people tried using the "not in" construct and did not see a difference. Perhaps you can try using the explain and output the results into a comment on that issue?