Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/63.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mysql 在同一个数据库上混合使用存储引擎可以吗?_Mysql_Opencart_Collation_Mariadb_Storage Engines - Fatal编程技术网

Mysql 在同一个数据库上混合使用存储引擎可以吗?

Mysql 在同一个数据库上混合使用存储引擎可以吗?,mysql,opencart,collation,mariadb,storage-engines,Mysql,Opencart,Collation,Mariadb,Storage Engines,我有一个OpenCart项目,数据库中有大约50000个产品。我已经将网络主机从VPS切换到了专用服务器,我看到了一些改进,但网站仍然落后 在VPS上,所有的表都是MyISAMlatin1\u swedish\u cimysql5.1.x.x排序表。在新服务器上,我切换到TokuDB和MariaDB 10。对于一些表,我不得不删除全文索引,我看到性能有所下降(所有表现在都在TokuDB上) 将一些表切换回MyISAM(只是为了使用全文索引)是明智的决定吗?OpenCart有一些连接许多表的查询。

我有一个OpenCart项目,数据库中有大约50000个产品。我已经将网络主机从VPS切换到了专用服务器,我看到了一些改进,但网站仍然落后

在VPS上,所有的表都是MyISAM
latin1\u swedish\u ci
mysql
5.1.x.x
排序表。在新服务器上,我切换到
TokuDB
MariaDB 10
。对于一些表,我不得不删除全文索引,我看到性能有所下降(所有表现在都在TokuDB上)

将一些表切换回MyISAM(只是为了使用全文索引)是明智的决定吗?OpenCart有一些连接许多表的查询。。。如果有人在托克德,有人在米桑,会有处罚吗?我只是在寻找性能,资源排在第二位


非常感谢

我认为这是正确的,我在数据库中混合了存储引擎,而且数据库的速度是正确的

无论如何,如果您使用opencart处理大量产品(50000),我建议您在(所有)表上创建索引,如果这样做,您可以提高速度

我做了以下工作:

    #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);
你必须在你的桌子上加上前缀

大概是这样的:
如果你知道自己在做什么以及为什么要这样做,那没关系

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


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

是的。完全可以接受,但这可以理解为观点。每个引擎都有其优缺点。了解并根据应用程序使用表格的方式为每个表格选择适当的引擎。InnoDB现在有全文。而且它似乎比MyISAM的FT更快。一般来说,混合引擎是可以的。请添加my.cnf、RAM和最活跃表格的表格大小(未压缩)