by adrianmonk · 5y ago · 0 comments
And MySQL seems to support "generated columns" which can be "virtual" and can have indexes. (Although in that case the expression lives in the column definition, so it's not actually in a where clause.)
Also, I guess some databases probably let you have an index on a view, which could be another way.
So if you really need a function in your where clause, there may very well be a way to do it efficiently. Of course, the usual caveat applies that it requires more I/O to maintain more indexes.
I found this article on the topic to be helpful:
https://saveriomiroddi.github.io/An-introduction-to-function...