In many scenarios, the following is the case
= Trim (b.colunm2)
How should we optimize it?
Many of the reasons for using TRIM are that some systems, in order to improve query efficiency, do not use ORACLE's unique, excellent, and never-before-defined VARCHAR2, but use the CHAR type to write dead character lengths.
Therefore, in the associated query when depressed, the newly established table on the use of VARCHAR2, if you do not TRIM off the CHAR type of space bar, there is no way to match, if used trim bar, the index is destroyed.
Also, the point is that while adding a trim (COLUNM1) index can improve lookup efficiency, it also increases storage space and affects write efficiency.
What to do!!!! What to do!!!
Fortunately you read my article, because my intelligence, think of the way to fill the blanks:
Rpad (a.colunm1,' character length ',' space '= b.colunm2
Is this a perfect solution?
Efficiency also times high!
Later found that this is not my original, Baidu has a long time ...
How to troubleshoot index problems with char types in Oracle