We recently installed 1.8 of this module. Now queries like the following represent 7% of our slow queries log:
SELECT * FROM view_view WHERE url LIKE 'node/141014%' AND page = 1;

This query is generated from the _nodewords_detect_type_and_ids() function, which is called via nodewords_get() from hook_menu() for every page (and file, including imagecache files) displayed. The LIKE string query against a non-indexed column is very inefficient, and is affecting our performance.

I modified the code to use the views_get_all_urls() function (which gets its results from cache) instead of doing a sql query, and searching the resulting array. Our performance is now much improved.

I've attached a patch which I hope you'll incorporate into the module.

CommentFileSizeAuthor
nodewords_views_opt.patch1.07 KBprfctns6@gmail.com

Comments

prfctns6@gmail.com’s picture

Status: Active » Needs review
Robrecht Jacques’s picture

Status: Needs review » Fixed

Fixed. Will be included in 5.x-1.10 released later today. Thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.