Hi,
using DB2 v9.5.2 on Linux I often get SQL from performance hell that is not using where conditional sample (programmer just forgets to put joins):
Code:
SELECT t1.col1, t2.col2
FROM table1 t1, table2 t2
but correct is:
Code:
SELECT t1.col1, t2.col2
FROM table1, table2 t2
WHERE t1.pk=t2.pk
Is there any way I could prevent executing this kind of SQLs. So to tell DB2 if "select...from..." is used without where conditional then return error and don't execute SQL.
But just in case if someone needs this kind of functionality I would like that "cross join" kind of syntax is allowed (if someone writes this kind of syntax then he/she is aware of what is he/she doing):
So sintax:
Code:
SELECT t1.col1, t2.col2
FROM table1 t1 CROSS JOIN table2 t2
should be allowed, but
Code:
SELECT t1.col1, t2.col2
FROM table1 t1, table2 t2
should not be allowed.
Regards