Expression histogramming selectivity estimates

Versions of Adaptive Server earlier than 15.0.2 used default “guesses” for selectivity estimates.

Adaptive Server versions 15.0.2 and later apply histogramming estimates to single column predicates if the histogram exists on the column. This results in more accurate row estimates, and improves the join order selection for query plans.

In this example, if the expression is very selective, it may be better to place table t1 at the beginning of the join order:

select * from t1,t2 where substring(t1.charcol, 1, 3) 
= "LMC" and t1.a1 = t2.b