I have a identity field that holds order numbers.
I have another table that holds company code.
I concat company code + order number . So I have XYZ1234 or ABC56879
All fine. Now, user wants to search by entering ABC56879.
1. Have a function to parse out ABC and use 56879 and search on that identity column.
2. Create a new column. Concat company code + identity field. Use this new column to search.
which one is better/faster?