PostgreSQL对联接中的表数有限制吗? [英] Does PostgreSQL have a limit on # of tables in a join?

查看:87
本文介绍了PostgreSQL对联接中的表数有限制吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天,在处理动态查询生成时,我发现mysql对于可以在一个联接中使用多少个表有一个硬性最大限制:

Today when playing around with dynamic query generation I discovered that mysql has a hard maximum limit of how many tables can be used in a join: 61.

我想知道PostgreSQL,PostgreSQL是否有类似的限制?

This lead me to wonder about PostgreSQL, does PostgreSQL have a analogous limit?

注意:我出于好奇而不是不必要地问这个。

推荐答案

没有限制AFAIK。

查询优化器将切换到一旦超出了表的(可配置)限制,便采用了不同的算法。但这仅表示计划是以不同的方式计算的,并不是说语句将失败(尽管这可能不是最快的计划)。

The query optimizer will switch to a different algorithm once a (configurable) limit of tables has been exceeded.But that just means the plan is calculated in a different way, not that the statement will fail (it might not be the fastest plan though).

http:// www。 postgresql.org/docs/current/static/planner-optimizer.html

这篇关于PostgreSQL对联接中的表数有限制吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆