It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center Closed 9 years ago .

With the growth of the size of the query, a query to a database can easily become computationally intractable by the RDBMS you use in pratice. So, I suppose, in order to use DBs in practice (do programming with a DB as a backend), you must know where the bound for the complexity/size of an admissible query is.

If you write programs that need to issue complex queries to relational databases, what is the "maximal" size/complexity of the queries that are expected to be effectively answerable by the RDMS you use?

And what is the usual size of the queries posed to relational database systems? How much is it lower than the maximal bound?

The motivation for asking this is the following theoretical speculation: It seems to be known that to find an answer to a query Q over a database D, one needs time |D||Q|, and one cannot get rid of the exponent |Q|. (Looking for a clique is an example of the worst-case query.) As D can be very large in practice, we wonder why database work at all.