ฉันไม่รู้จัก Magento CE เวอร์ชันที่คุณกำลังดิ้นรนอยู่ แต่ฉันมีปัญหาเรื่องประสิทธิภาพที่ร้ายแรงกับ CE 1.6
สาเหตุ: ดัชนีผิดและขาดหายไป พวกเขาอยู่ที่ไหนที่ได้รับการแก้ไขใน CE 1.6.2
คุณอาจตรวจสอบว่ามันช่วยคุณได้หรือไม่
ฉันลดเวลาเช็คเอาต์สำหรับ 38 สายรวม 73 รายการจาก 123 วินาทีเหลือ 4 วินาที !!!!
ที่นี่มันมา:
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/* Foreign Keys must be dropped in the target to ensure that requires changes can be done*/
ALTER TABLE `core_url_rewrite`
DROP FOREIGN KEY `FK_CORE_URL_REWRITE_CTGR_ID_CAT_CTGR_ENTT_ENTT_ID` ,
DROP FOREIGN KEY `FK_CORE_URL_REWRITE_STORE_ID_CORE_STORE_STORE_ID` ;
/* Alter table in target */
ALTER TABLE `catalog_category_entity_varchar`
DROP KEY `MAGMI_CCEV_OPTIMIZATION_IDX` ;
/* Alter table in target */
ALTER TABLE `catalog_product_bundle_stock_index`
DROP KEY `PRIMARY`, ADD PRIMARY KEY(`entity_id`,`website_id`,`stock_id`,`option_id`) ;
/* Alter table in target */
ALTER TABLE `catalog_product_entity_media_gallery`
DROP KEY `MAGMI_CPEM_OPTIMIZATION_IDX` ;
/* Alter table in target */
ALTER TABLE `core_url_rewrite`
CHANGE `id_path` `id_path` varchar(255) COLLATE utf8_general_ci NULL COMMENT 'Id Path' after `store_id` ,
CHANGE `request_path` `request_path` varchar(255) COLLATE utf8_general_ci NULL COMMENT 'Request Path' after `id_path` ,
CHANGE `target_path` `target_path` varchar(255) COLLATE utf8_general_ci NULL COMMENT 'Target Path' after `request_path` ,
CHANGE `is_system` `is_system` smallint(5) unsigned NULL DEFAULT 1 COMMENT 'Defines is Rewrite System' after `target_path` ,
CHANGE `options` `options` varchar(255) COLLATE utf8_general_ci NULL COMMENT 'Options' after `is_system` ,
CHANGE `description` `description` varchar(255) COLLATE utf8_general_ci NULL COMMENT 'Deascription' after `options` ,
CHANGE `category_id` `category_id` int(10) unsigned NULL COMMENT 'Category Id' after `description` ,
CHANGE `product_id` `product_id` int(10) unsigned NULL COMMENT 'Product Id' after `category_id` ,
ADD KEY `FK_CORE_URL_REWRITE_PRODUCT_ID_CATALOG_CATEGORY_ENTITY_ENTITY_ID`(`product_id`) ,
DROP KEY `FK_CORE_URL_REWRITE_PRODUCT_ID_CATALOG_PRODUCT_ENTITY_ENTITY_ID` ,
ADD CONSTRAINT `FK_CORE_URL_REWRITE_PRODUCT_ID_CATALOG_CATEGORY_ENTITY_ENTITY_ID`
FOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE ,
DROP FOREIGN KEY `FK_CORE_URL_REWRITE_PRODUCT_ID_CATALOG_PRODUCT_ENTITY_ENTITY_ID` ;
/* Alter table in target */
ALTER TABLE `eav_attribute`
DROP KEY `MAGMI_EA_CODE_OPTIMIZATION_IDX` ;
/* Alter table in target */
ALTER TABLE `eav_attribute_option_value`
DROP KEY `MAGMI_EAOV_OPTIMIZATION_IDX` ;
/* The foreign keys that were dropped are now re-created*/
ALTER TABLE `core_url_rewrite`
ADD CONSTRAINT `FK_CORE_URL_REWRITE_CTGR_ID_CAT_CTGR_ENTT_ENTT_ID`
FOREIGN KEY (`category_id`) REFERENCES `catalog_category_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE ,
ADD CONSTRAINT `FK_CORE_URL_REWRITE_STORE_ID_CORE_STORE_STORE_ID`
FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE ;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;