Does PostgreSQL have a limit on # of tables in a join?

雨燕双飞 提交于 2019-12-10 12:33:32

问题


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.

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

Note: I am asking this out of curiosity, not need.


回答1:


There is no 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



来源:https://stackoverflow.com/questions/5599867/does-postgresql-have-a-limit-on-of-tables-in-a-join

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!