Last week I had already started two threads dealing with slow SQL selects that probably did not use the index.
Today I noticed the following: The customer and the material are involved in almost all index accesses.
Customer and material are nvarchar fields everywhere, and the customer and material numbers are the same in all tables.
Only the length of the nvarchar fields is different in different tables. The customer sometimes consists of an nvarchar (10), sometimes of an nvarchar (20) and sometimes of an nvarchar (30). This is because these tables were created by external consultants who each used a different length for the customer-fields.
However, the customers are only seven characters everywhere in all tables.
Could that be a reason that the index access is not working?
Does the nvarchar length play a role when linking different tables via fields for which an index exists?