on 02-18-2019 7:02 AM
The section is SAP HANA performance analysis guide suggests avoiding SET operations
SELECT a, b FROM T UNION SELECT a, b FROM S;
could be better as
SELECT DISTINCT COALESCE(T.a, S.a) a, COALESCE(T.b, S.b) b FROM T FULL OUTER JOIN S ON T.a = S.a AND T.b = S.b;
Till date , I always thought that SET operations was better for performance or UNIONS ALL was highly efficient .
Am I understanding wrong ?
The second query using COALESCE and FULL OUTER JOIN seems more intensive operations .
Can any one explain ?
Also EXIST is a co related query . Any tips to alternately frame queries to avoid it ?
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.