Bob, 

I'm not sure, but the maximum number of tables is big.  I frequently 
have views with 7 or more tables in them. Your example, however, 
looks dangerous, because STATELU is not linked to any other table in 
your WHERE clause.  

Multi-table SELECT statements must link every table to matching data 
in the appropriate other tables, or you end up multiplying every single 
row in the unlinked table(s) by the rows in the other table.  So, if you 
have 10,000 people, with 15,000 addresses among them, and a statelu 
table with 50 states, your query above would generate a result set of 
15,000 x 50 rows, which is a 750,000 row result set, probably more 
than you want <g>.  You'll definitely take a performance hit.

More appropriate would be something like:

SEL LASTNAME FIRSTNAME ADDR1 STATELONG +
FROM PEOPLE p1, ADDRESS a2, STATELU s3 +
WHERE (p1.id = a2.id) AND (a2.state = s3.state)

Bill


On Sat, 5 May 2001 17:03:31 -0400, Bob Powell wrote:

>SEL LASTNAME FIRSTNAME ADDR1 STATELONG FROM 
PEOPLE, 
>ADDRESS, STATELU WHE PEOPLE.ID = ADDRESSS.ID




Reply via email to