I think both cases only need to scan the indexes, but this is not the case. Only BTree index is used.
The following is an example