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

Re: Function-based index not work.

$
0
0

I think this is likely due to the parameterization of the literals within the substring clause, I'm not sure the behaviour has changed. Maybe you have statement cache/literal_autoparam enabled on SP132.

Because it is parameterizing the literals in the substring() it has to compile a plan that will satisfy other literals within the substring clause, hence the tablescan. If you turn off literal parameterization you should see it picks the index.

 

set literal_autoparam off

exec sp_recompile aaa

<query>

 

You should log this with SAP as a feature request. What they could do is check for function-based indices on the table(s) within the query and any entries in the predicate that match the definition of that function index could be cached in the statement cache without alteration. I.e. not applying literal parameterization to the literals within any built-in functions contained within that specific built-in.


Viewing all articles
Browse latest Browse all 3587

Trending Articles



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