一台客户的MYSQL服务器占用CPU过高,查找出占用进程,是MYSQL中的
INSERT INTO search_tmp_******* SELECT search_index.entity_id, (((0) + (0) + (0) + (0)) * 1) AS score FROM catalogsearch_fulltext_scope2 AS search_index LEFT JOIN catalog_eav_attribute AS cea ON search_index.attribute_id = cea.attribute_id INNER JOIN catalog_category_product_index AS category_ids_index ON search_index.entity_id = category_ids_index.product_id LEFT JOIN catalog_product_index_eav AS zzmarque_filter ON search_index.entity_id = zzmarque_filter.entity_id AND zzmarque_filter.attribute_id = 244 AND zzmarque_filter.store_id = 1 LEFT JOIN cataloginventory_stock_status AS zzmarque_filter_stock ON zzmarque_filter_stock.product_id = zzmarque_filter.source_id LEFT JOIN catalog_product_index_eav AS systeme_exploitation_filter ON search_index.entity_id = systeme_exploitation_filter.entity_id AND systeme_exploitation_filter.attribute_id = 534 AND systeme_exploitation_filter.store_id = 1 LEFT JOIN cataloginventory_stock_status AS systeme_exploitation_filter_stock ON systeme_exploitation_filter_stock.product_id = systeme_exploitation_filter.source_id LEFT JOIN cataloginventory_stock_status AS stock_index ON search_index.entity_id = stock_index.product_id AND stock_index.website_id = 0 WHERE (stock_index.stock_status = 1) AND (category_ids_index.category_id = 4283) AND (zzmarque_filter.value IN ('818','4429') AND zzmarque_filter_stock.stock_status = 1) AND (search_index.entity_id IN ( SELECT entity_id FROM ( SELECT e.entity_id, IFNULL(current_store.value, main_table.value) AS taille_ecran_pouces FROM catalog_product_entity AS e INNER JOIN catalog_product_entity_varchar AS main_table ON main_table.entity_id = e.entity_id LEFT JOIN catalog_product_entity_varchar AS current_store ON current_store.attribute_id = main_table.attribute_id AND current_store.store_id = 2 WHERE (main_table.attribute_id = '265') AND (main_table.store_id = 0) HAVING (taille_ecran_pouces IN ('13230'))) AS filter )) AND (systeme_exploitation_filter.value IN ('9908') AND systeme_exploitation_filter_stock.stock_status = 1)
太多的查寻
INSERT INTO search_tmp_******
及写入语句超时执行,导致整体CPU占用过高
执行以下操作可修复: