I'm going to face a problem like this.
I have a query to tune that does joins to own table using like any conditions. The pseudo code would be something like
SEL A.COL1, A.COL2
FROM TABLE1 A LEFT OUTER JOIN TABLE2 B
WHERE A.COL1 = B.COL1
AND B.COL2 LIKE ANY ( SEL C.COL1 FROM TABLE1 C WHERE C.COL2 LIKE '%@%%' ESCAPE '@') LEFT OUTER JOIN TABLE1 Z
ON Z.COL2 LIKE ANY ( ...
i don't get it, why would people write such? If i have a million rows for TABLE2 and gazillion rows for TABLE1. That would send the teradatabox to oblivion, why would people do such use those like any functions? any performance alternative?