简体   繁体   English

选择多个数据库

[英]Select over multiple databases

In a project at work i have to improve performance. 在工作中的项目中,我必须提高性能。 The data of the app is spread over many databases. 该应用程序的数据分布在许多数据库中。 I was told that is better for organizing the data. 有人告诉我,组织数据更好。 Whatever. 随你。 Is there a performance penalty when i do a select over some tables spread on several databases instead of a select on those tables in one database? 当我对分布在多个数据库中的某些表进行选择而不是对一个数据库中的那些表进行选择时,是否会有性能损失?

取决于这些数据库是否在同一台物理服务器上。

No, there shouldn't be a signifigant performance increase from spreading queries across different databases in mysql, assuming that the database are part of the same mysql install. 不,假设数据库是同一mysql安装的一部分,那么将查询分布在mysql中的不同数据库上不应显着提高性能。

You'll do better to start with reducing the number of queries per page request, and zeroing in on individual queries that are taking a long time to complete. 您最好从减少每个页面请求的查询数量开始,然后对需要很长时间才能完成的单个查询清零。

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

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