From multiple articles on the internet I see SQL casting is said to be able to impact performances severely and almost always the reason is it disables index usage.
But to me it looks it could always be avoided: Casting could disable merge join usage (and merge benefits from index usage) but hash join, that is said to be generally faster than merge, can still be utilized in the same way(looks to me). No matter in which phase of the hash join (build of probe) casting is applied, all that has to be additionally done is casting, before hashing, for the column casted.
Hash join, anyway, passes every row of the first table once, same as for the second table. Hence, from my aspect, casting of join columns, applied to hash join, has not performance impact but the casting operation itself. And the guys on the internet say casting severely impacts performances since indexes cannot be used?
Is something wrong in my thinking above? Thank you for the time