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.
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
精彩评论