Usually in SQL when you do a search on the lines of
... where blah like 'tony%'
You can index blah column and then get a B Tree search.
When you search for
'%tony'
You don't get a B tree search even if you index the column and you can get a table scan unless the database indexes it another way which varies from database to database.
What way does it work in SOQL land?
- How do we specify to index a column?
- How do we specify the type of index?
- How do we specifcally deal with the search of type '%tony' and avoid table scan?