是否可以在同一数据库上混合使用存储引擎



我有一个OpenCart项目,数据库中有大约50,000种产品。我已经将虚拟主机从VPS切换到专用服务器,并且看到了一些改进,但是网站仍然滞后。

在VPS上,所有表都MyISAM了mysql 5.1.x.x上的latin1_swedish_ci排序规则。在新服务器上,我已切换到TokuDBMariaDB 10.对于某些表,我不得不删除FULLTEXT索引,并且我看到性能有所下降(所有表现在都在TokuDB上)。

将一些表切换回MyISAM(只是为了使用全文索引)是一个明智的决定吗?OpenCart有一些查询连接了很多表...如果有些在TokuDB上,有些在MyISAM上,会有惩罚吗?我只是在寻找性能,资源排在第二位。

多谢!

我认为

这是正确的,我在数据库中有混合存储引擎,数据库的速度是正确的。

无论如何,如果您使用带有大量产品(50,000)的opencart,我建议您在(所有)表上创建了索引,如果您这样做,则可以提高速度。

我做了以下工作:

    #Tabla category campo parent_id
CREATE INDEX i_parent_id ON category (parent_id);
#Tabla category_description campo language_id
CREATE INDEX i_category_description ON category_description (language_id);
#Tabla category_path campos path_id y level
CREATE INDEX i_category_path ON category_path (path_id,level);
#Tabla category_to_store campo store_id
CREATE INDEX i_category_to_store ON category_to_store (store_id);
#Tabla manufacturer_to_store campo store_id
CREATE INDEX i_manufacturer_to_store ON manufacturer_to_store (store_id);
#Tabla product campos manufacturer_id, date_added, date_modified
CREATE INDEX i_product ON product (manufacturer_id, date_added, date_modified);
#Tabla product campos model, sku, upc, ean,(como veis donde tengais la referencia etc) y con tipo FULLTEXT (si el campo es de caracteres no de números)
CREATE FULLTEXT INDEX i_product_fulltext ON product (model, sku, upc, ean);
#Tabla product_description campo language_id
CREATE INDEX i_product_description ON product_description (language_id);
#Tabla product_to_category campo category_id
CREATE INDEX i_product_to_category ON product_to_category (category_id);
#Tabla product_to_store campo store_id
CREATE INDEX i_product_to_store ON product_to_store (store_id);
#Tabla setting campo store_id, serialized
CREATE INDEX i_setting ON setting (store_id, serialized);
#Tabla url_alias campo query con tipo FULLTEXT
CREATE FULLTEXT INDEX i_url_alias ON url_alias (query);# 6936 filas afectadas.
#Tabla zone campo country_id
CREATE INDEX i_zone ON zone (country_id);
#Tabla zone campo name y code con tipo FULLTEXT
CREATE FULLTEXT INDEX i_zone_fulltext ON zone (name,code);

您必须将"前缀"放在桌子上。

像这样:http://www.codigojavaoracle.com/desarrollo-web/mejorar-la-velocidad-en-opencart/

如果你知道自己在做什么以及为什么要这样做,那就没关系了。

不同的引擎使用内存和磁盘存储的方式非常不同。对于OLTP类型的系统,InnoDB通常比MyISAM更明智(在尝试其他引擎之前您是否检查了争用?但是您添加到缓冲池的任何内存(以提高InnoDB性能)不再可用于VFS或排序缓冲区(帮助MyISAM性能)。

我真的很难想象TokuDB作为电子商务网站的存储基板有什么意义。这一切都是为了获得更快的插入和更新写入速度,以及 SSD 上的低维护 - 选择性能很少比其他引擎更好。

最新更新