PostgreSQL:在单独的模式中联接两个表会降低性能 [英] PostgreSQL: Performance penalty for joining two tables in separate schemas
问题描述
在独立的模式(但是在同一数据库中)中连接两个表时,是否会降低性能?
Is there a performance penalty when joining two tables in separate schemas (However in the same database).
我的物理模型有几个截然不同的部分,非常适合它们自己的模式,但是有时我需要跨模式加入,而我一直无法找到有关这是否会对性能造成负面影响的任何信息。
My physical model has several distinct sections that fit nicely into their own schemas, however I occasionally need to join across schemas and I've been unable to find any information on if this has a negative performance impact.
推荐答案
否,架构只是一个名称空间。
No, a schema is just a namespace.
当表(或其索引)存储在不同的表空间时,性能可能会有所不同。一个表空间可能位于快速存储设备上,另一个表空间位于较慢的存储设备上。但这是您的选择,与架构无关。
Performance might be different when tables (or their indexes) are stored on different tablespaces. One tablespace might be on a fast storage device, the other on a slow one. But that's your choice and has nothing to do with a schema.
这篇关于PostgreSQL:在单独的模式中联接两个表会降低性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!