
Create a Function-based Index with NLSSORT
The performance fluctuations in a query on production database were attributed to different NLS_SORT settings affecting SQL plan selection. The query showed varying performance with differing plan_hash_values despite a simple structure. Investigations revealed the impact of NLS settings on plan generation. Mimicking the behavior with setting NLS_SORT value in session confirmed the issue, leading to the creation of a functional index that resolved the problem, as evidenced by the subsequent execution plan.





