问题
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