Comming from an MySQL background I'm having difficulties to understand what's wrong with the following setup.
I have two tables variable and dimension
Both have a primary key, variable furthermore has a foreign key to dimension named dimension_instance_1_uid, on which an index was created.
When I execute a query like this
SELECT this_.name, dimensioni4_.name FROM dbo.variable this_ INNER JOIN dbo.dimension_instance dimensioni4_ -- even with index hint nothing changes... -- WITH (INDEX(PK_dimension_instance)) ON this_.dimension_instance_1_uid = dimensioni4_.UID it seems as if the index isn't used for a seek and a scan is executed according to the execution plan. It shows two index scan's instead of one index scan and one index seek.

I would expect a index seek because in my case in dimension_instance only 10 of 15k records match entries in variable table.
Can anybody shed some light in my misunderstanding of how MS SQL indexes work.
it seems as if the index isn't used at all. That can't be right. Obviously the index is used, because there are two index scans in the plan. It may not be doing the seek you want, but it's still used. What confuses me in the plan and question is that these are both PK indexes. I see no reference to the FK index in plan, which might reduce the cost of the join. But even your index hint was pushing the PK index, and not the FK. Perhaps if you added thenamecolumn as a non-indexed field to the FK index, so that the index covers thevariabletable, you might get different results.