Quantcast
Channel: SCN: Message List - SAP Adaptive Server Enterprise (SAP ASE) for Custom Applications
Viewing all articles
Browse latest Browse all 3587

Re: In a select clause, what can not be resolved by hashing?

$
0
0

..one more amendment (these kind of questions niggle at me :-))

Even an ansi having clause may be resolved by hashing if indeed the optimizer decides to take care of the having clause before the group by, which it may well do provided it it is still guaranteed to give the correct results of course.

 

select max(a1),a2,b2 from a,b

where a1=b1

group by a2,b2

having a2=b2

plan '( group_hashing ( h_join ( t_scan a ) ( t_scan b ) ) )'

 

This will resolve the join predicate and the having clause using a hash join on a1=b1and a2=b2 before performing the grouped aggegration operation (which is this example will also be resolved with hashing).


Viewing all articles
Browse latest Browse all 3587

Trending Articles



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