Indexing is most often done intuitively on columns to optimize search time. But, this do not necessarily produce optimized results . Indexing requires various factors to be considered for clauses usage in the query. Let’s look into how this optimization is a developer trade off.
More information