A select from a column of type CHAR is too slow using TRIM
This is slow even when run on the PL/SQL editor.
Now removing the TRIM function for the column, when executed the query on a PL/SQL editor is supremely fast and gave the desired results. Less than 10 seconds.
However without the TRIM function on the same "Select" and inside an stored procedure gave NO RESULTS. This is completely weird and confusing.
NOTE: We are retrieving the values from the production table which is really huge. The synopsis of the select statement is,