最近發現有一台阿裡雲RDS數據庫服務器負載持續很高,CPU總是占滿,當前連接數超過幾十的時候網站就被卡得不能動了。除了升級RDS配置以外,可以仔細檢查慢查詢日志,發現這種查詢特别多:
SELECT node.title AS node_title, node.nid AS nid, node.sticky AS node_sticky, node.created AS node_created FROM node node WHERE (( (node.status = 1 OR (node.uid = 0 AND 0 <> 0 AND