Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8695

Re: Slow case statement evaluation comparing values from two tables

$
0
0

Hi Patrick,

You mentioned that separating the two SQL statements with each SQL execution runs for 2 seconds.

Can you try to use UNION and see how long it takes?

For example:

select a.CUSTOMER

from table1 a where a.XYZ is not NULL

UNION

select b.CUSTOMER

from table2 b join table 1 a on b.XYZ=a.XYZ WHERE a.XYZ is NULL

 

Regards,

Ferry


Viewing all articles
Browse latest Browse all 8695

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>