note
rnahi
<p>Of course you are running out of memory. Your query is
generating five
<a href="http://www.fluffycat.com/sql/cartesian-joins/">cartesian products</a>!</p>
<p>If you don't set a join clause for each table, your query will be
producing a huge number of rows. And this would slurp up all your available
resources, no matter which DBMS you are using.</p>
For example, if each table had 50 rows, then your query would generate
15,625,000,000 (fifteen billion rows).<br/>
With 100 rows per table, you'd get
1,000,000,000,000 rows (one thousand billion rows!). You get the idea.</p>
<p>Go get a SQL tutorial before continuing any further.</p>
529394
529394