产品平面表不会重新索引 - 行大小太大 [英] Product flat table will not reindex - Row size too large

查看:23
本文介绍了产品平面表不会重新索引 - 行大小太大的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试重新索引产品平面数据时,我得到 重新索引过程出现问题.数据库修复没有帮助.Exception.log 文件显示此错误

When i try to reindex product flat data,I am getting There was a problem with reindexing process.Database repair didn't help.Exception.log file show this error

2011-08-29T11:54:05+00:00 DEBUG (7): Exception message: SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs
Trace: #0 /home/sites/www.domain.com/lib/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/sites/www.domain.com/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /home/sites/www.domain.com/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('ALTER TABLE `ca...', Array)
#3 /home/sites/www.domain.com/lib/Varien/Db/Adapter/Pdo/Mysql.php(337): Zend_Db_Adapter_Pdo_Abstract->query('ALTER TABLE `ca...', Array)
#4 /home/sites/www.domain.com/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Flat/Indexer.php(652): Varien_Db_Adapter_Pdo_Mysql->query('ALTER TABLE `ca...')
#5 /home/sites/www.domain.com/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Flat/Indexer.php(122): Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Flat_Indexer->prepareFlatTable('1')
#6 /home/sites/www.domain.com/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Flat/Indexer.php(115): Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Flat_Indexer->rebuild('1')
#7 /home/sites/www.domain.com/app/code/core/Mage/Catalog/Model/Product/Flat/Indexer.php(64): Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Flat_Indexer->rebuild(NULL)
#8 /home/sites/www.domain.com/app/code/core/Mage/Catalog/Model/Product/Indexer/Flat.php(301): Mage_Catalog_Model_Product_Flat_Indexer->rebuild()
#9 /home/sites/www.domain.com/app/code/core/Mage/Index/Model/Process.php(139): Mage_Catalog_Model_Product_Indexer_Flat->reindexAll()
#10 /home/sites/www.domain.com/app/code/core/Mage/Index/Model/Process.php(167): Mage_Index_Model_Process->reindexAll()
#11 /home/sites/www.domain.com/app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php(124): Mage_Index_Model_Process->reindexEverything()
#12 /home/sites/www.domain.com/app/code/core/Mage/Core/Controller/Varien/Action.php(420): Mage_Index_Adminhtml_ProcessController->reindexProcessAction()
#13 /home/sites/www.domain.com/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(253): Mage_Core_Controller_Varien_Action->dispatch('reindexProcess')
#14 /home/sites/www.domain.com/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#15 /home/sites/www.domain.com/app/code/core/Mage/Core/Model/App.php(340): Mage_Core_Controller_Varien_Front->dispatch()
#16 /home/sites/www.domain.com/app/Mage.php(627): Mage_Core_Model_App->run(Array)
#17 /home/sites/www.domain.com/index.php(80): Mage::run('', 'store')
#18 {main}

有什么指点吗?

推荐答案

您超出了产品平面数据表中的行数限制.基本上 255 * 属性数 > 65535,这是 MySQL 中每行允许的最大字符数http://dev.mysql.com/doc/refman/5.1/en/column-count-limit.html

You've exceeded the row limits in your product flat data table. Basically 255 * Number of Attributes > 65535 which is the maximum allowable characters per row in MySQL http://dev.mysql.com/doc/refman/5.1/en/column-count-limit.html

这可以通过关闭以下属性来移除不需要出现在产品平面数据表中的任何属性来解决:用于产品列表用于排序在产品列表中,然后在您将字符数减少到限制以下时尝试重新索引.

This can be fixed by removing any attributes that you do not need to appear in the product flat data table by turning off the following attribute properties: Used in Product Listing and Used for Sorting in Product Listing and then attempting a reindex when you've reduced the character count to below the limit.

如果绝对有必要将所有内容都放在那里,那么您需要开始将产品平面数据中的某些属性存储限制为小于自动分配的 255 个字符的最大值.Sonassi在这里告诉你如何做到这一点:http://www.sonassi.com/knowledge-base/magento-knowledge-base/mysql-limitations-on-the-flat-catalogue-in-magento/

If it's absolutely necessary to have everything there, then you need to start limiting some of the attribute storage in product flat data down to less than the 255 char maximum that's automatically assigned. Sonassi tells you how to do this here: http://www.sonassi.com/knowledge-base/magento-knowledge-base/mysql-limitations-on-the-flat-catalogue-in-magento/

这篇关于产品平面表不会重新索引 - 行大小太大的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆