We have many queries for which we add a random alias at the end of the field and table name (due to a custom ORM implementation, which can be difficult to change). The queries are similar to the following (although much more complex, more often):
SELECT fooA.field1 as field1B,
fooA.field2 as field1C
FROM foo as fooA
The suffixes A, B, and C are randomly generated (and longer than one character). Will this worsen the execution of our queries (i.e., the Optimizer will not be able to recognize duplicate queries due to a random part)? We mainly use SQL Server 2005.
source
share