• Mansfield (4/11/2013)


    1. Joining integer columns (provided that they are correctly indexed) is faster than joining other data types because it is relatively straightforward (see below)

    2. It depends. Varchar and nvarchar columns are joined according to rules specified by the columns' collation.

    3. It depends. Run the specific query and check the execution plan. If the group by column is the clustered index I would expect SQL Server exploit the natural sort order.

    Thanks for your reply. I am still not sure why the joining of int is faster.

    If I have an identity column(bigint) and a 4 character character code. Which I should be given preference while joining. Lets assume none of them have index.

    Regards,
    Pravasis