The hosting company took our site down because they claim a major performance issue:| 273679 | thepolit_dbuser | localhost | thepolit_drupaldb | Query | 99 | Copying to tmp table | SELECT path FROM print_mail_page_counter LEFT JOIN node ON path = CONCAT('node/', node.nid) WHERE st |

Why is this being flagged as being bad enough to shut down a site?

Comments

jcnventura’s picture

Status: Active » Postponed (maintainer needs more info)

Hi Nancy,

I guess it's bad enough because it's a join operation. However, this code is only triggered for the 'view' operation of the 'Most emailed' block, which can easily be removed from being displayed..

This code might be possible to optimize from a DB point of view, as I'm offloading all the computation onto the query on checking if the top 'page' is a node and if so, if it's published. I'm not sure there's any way to make it 100% correct any other way, but as long as it works 99% of the time it should be OK.

Please note that this block is cached globally, so I thought that a non-optimized query would be OK, as it would not be run often enough to make much of a difference.

João

jcnventura’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

No further info in a long time.. Closing the issue.