简体   繁体   English

连接来自多个数据库的表使用

[英]Joining tables from multiple databases using

I'd like to group together MariaDB tables with similar functionality into different databases.我想将具有相似功能的 MariaDB 表组合到不同的数据库中。 What is the preferred way of executing JOIN operation using PHP PDO on tables from multiple databases?在来自多个数据库的表上使用 PHP PDO 执行 JOIN 操作的首选方法是什么? Is there any performance penalty for doing that?这样做有什么性能损失吗? Usually I only connect to 1 database at the time.通常我当时只连接到 1 个数据库。

Is there some other way to organize mariadb tables?还有其他方法来组织 mariadb 表吗? I am using Sequel Pro, and it is hard to work with when the number of tables increases to 50 or more with no visible separation between them.我正在使用 Sequel Pro,当表格数量增加到 50 个或更多且它们之间没有明显的分隔时,很难使用。

I would personally suggest you to be careful with this especially If you wan't to achieve performance from your code.我个人建议您特别注意这一点,如果您不想从代码中获得性能。 Carefully read documentation about JOIN what it does when you combining two tables, also suggesting you to read about indexing and unqiue keys in MariaDB.仔细阅读有关JOIN的文档,当您组合两个表时,它会做什么,还建议您阅读 MariaDB 中的索引和 unqiue 键。 Good Luck:)祝你好运:)

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

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