I have a column with a numeric string in oracle with examples of zeros or without them:
00000000056
5755
0123938784579343
00000000333
984454
The problem is that partial search operations, for example, are very slow
select account_number from accounts where account_number like %57%
one solution restricts the search to exact matches only and adds an additional integer column that will represent a numerical value for exact matches.
At this point, I’m not sure that we can add an additional column.
Do you have any other ideas?
Is it possible to tell Oracle to index a column of a numeric string as an integer value so that we can make an exact numeric match on it?
For example, a query by value: 00000000333
will be:
select account_number from accounts where account_number = '333'
.
regex_like , , .