Writing the previous post it came to my mind, that many people may not be aware that using custom functions in WHERE clauses may be the reason why the index is not used. There are several facts about indexes you should keep in mind: