Forum: Building VoltDB Applications

Post: Is there a known limit to number of joins?

Is there a known limit to number of joins?
pmarch
Feb 14, 2011
A portion of my application provides a list view. For this view, I need related info from many tables. The query isn't all that complex, but it does join all the tables. I have experienced that joining a few tables works fine. When I get up to 5 or 6 tables, the procedure won't even compile. Memory is used up very quickly and fails with a heap error (tried as much as 1GB heap for java). (Playing with the query in adhoc mode results in a similar result - a few joins work, at 5 or 6 it never returns.) Is this expected (i.e. I'm doing something that isn't really expected to be done in volt)? Is there a different approach I should be pursuing? (I am more experienced with MySQL, Oracle, etc...)
Found answer
pmarch
Feb 15, 2011
Sorry - found this here Release Notes - seems to explain all...
1.3.1.5.
Issue #219 VoltDB supports joins of up to six tables
You can create a join of up to six tables in a SELECT statement (such as SELECT ... FROM t1, t2, t3, t4, t5, t6). Joining more than six tables will fail at compile time (or at runtime for ad hoc queries). The workaround is to separate the statement into multiple SELECT statements with six or fewer joins.
re: supported number of joins
tcallaghan
Feb 15, 2011
Sorry - found this here - seems to explain all...
1.3.1.5.
Issue #219 VoltDB supports joins of up to six tables
You can create a join of up to six tables in a SELECT statement (such as SELECT ... FROM t1, t2, t3, t4, t5, t6). Joining more than six tables will fail at compile time (or at runtime for ad hoc queries). The workaround is to separate the statement into multiple SELECT statements with six or fewer joins.


No problem at all, thanks for posting what you found.
-Tim