简体   繁体   English

使所有表都在mysql数据库中的innoDb类型

[英]making all tables in a mysql database innoDb type

i'm Developing a large Website, and adding many functionalities on it. 我正在开发一个大型网站,并在其上添加了许多功能。 I want to know if there's any problem with making all the tables in the database InnoDB type, cuz there are so many foreign key connection within all the tables I have like 20 tables in the database, and all the tables in the database are all connected together somehow, is there any problem with this, or it's okay, thanks. 我想知道在数据库InnoDB类型中创建所有表是否有任何问题,因为在所有表中有如此多的外键连接我在数据库中有20个表,并且数据库中的所有表都已连接不知何故,这有什么问题,或者没关系,谢谢。

InnoDB is preferred over MyISAM and if you have foreign key constraints then you should use InnoDB anyway since MyISAM doesn't support foreign keys. InnoDB优于MyISAM,如果你有外键约束,那么你应该使用InnoDB,因为MyISAM不支持外键。

Also, if you want to use InnoDB, its usually recommended that all tables use InnoDB. 此外,如果您想使用InnoDB,通常建议所有表使用InnoDB。 It provides a number of advantages anyway so I'd say yes, make all tables InnoDB unless you have a good reason not to (ie you need MyISAM Geospatial extensions or Fulltext and your InnoDB version doesn't support those features). 它提供了许多优点,所以我会说是的,除非你有充分的理由不做所有表InnoDB(即你需要MyISAM地理空间扩展或全文,你的InnoDB版本不支持这些功能)。

没有任何问题,您应该使用可用的任何功能,例如INNODB引擎。

Problems, no. 问题,没有。 But what dbm are you using? 但是你使用的dbm是什么? (InnoDB is the default storage engine for MySQL) So there should be no problems, assuming you are using MySQL or any others that support InnoDB. (InnoDB是MySQL的默认存储引擎)因此,假设您使用的是MySQL或任何支持InnoDB的其他应用程序,那么应该没有问题。 but what are you doing with the tables and what would cause a problems, or that you think would cause problems ... 但是你对这些表做了什么,会导致什么问题,或者你认为会导致问题......

As far as I am aware the only non-trivial reason to choose MyISAM over InnoDB is for Full-Text indexing. 据我所知,选择MyISAM而不是InnoDB的唯一非常重要的原因是全文索引。 Apart from that, InnoDB's support for transactions and foreign key constraints make it a much better choice for the vast majority of applications. 除此之外,InnoDB对事务和外键约束的支持使其成为绝大多数应用程序的更好选择。

That said, there's nothing stopping you from using a few MyISAM tables alongside InnoDB tables if you require some functionality from MyISAM. 也就是说,如果你需要MyISAM的一些功能,没有什么能阻止你使用InnoDB表旁边的一些MyISAM表。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM