Slow repetitive SQL queries

xurizaemon - July 9, 2009 - 00:54
Project:Feed Path Publisher
Version:5.x-1.4
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

We're seeing queries of this form end up in the MySQL slow query log:

  SELECT title, feed, fppid FROM feed_path_publisher
   WHERE path_prefix = LEFT("node/20060", LENGTH(path_prefix))
      OR path_prefix = LEFT("node/20060", LENGTH(path_prefix))
      OR path_prefix = LEFT("node/20060", LENGTH(path_prefix))
ORDER BY weight, path_prefix;

In our case, node/20060 is our front page.

I wonder if the restrictions could be uniqued, so that we don't see duplication there?

Also, is it intentional that an empty path_prefix will match all entries in {feed_path_publisher}?

 
 

Drupal is a registered trademark of Dries Buytaert.