Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 808
Tom Neyland Avatar asked Apr 08 '11 19:04

Tom Neyland


People also ask

How does PostgreSQL limit work?

PostgreSQL LIMIT is an optional clause of the SELECT statement that constrains the number of rows returned by the query. The statement returns row_count rows generated by the query. If row_count is zero, the query returns an empty set.

Can Postgres handle 1 billion rows?

As commercial database vendors are bragging about their capabilities we decided to push PostgreSQL to the next level and exceed 1 billion rows per second to show what we can do with Open Source. To those who need even more: 1 billion rows is by far not the limit - a lot more is possible.

Can PostgreSQL handle big data?

PostgreSQL is well known as the most advanced opensource database, and it helps you to manage your data no matter how big, small or different the dataset is, so you can use it to manage or analyze your big data, and of course, there are several ways to make this possible, e.g Apache Spark.

How many transactions can Postgres handle?

PostgreSQL processes more than 20 thousand transactions per second when MongoDB doesn't reach 2 thousand. PostgreSQL latencies are under 50ms for the 99% percentile, and as low as less than 1 millisecond.


1 Answers

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

like image 141
a_horse_with_no_name Avatar answered Oct 18 '22 22:10

a_horse_with_no_name