MSSQLTips.com - your daily source for SQL Server tips

Google
 
Web mssqltips.com

ESSENTIALS: Home | Tips | Search | Categories | Top 10 | Products | Authors | Blogs | Forums | Webcasts | Advertise | About
Adding Alias name will improve the performances Or not? - MSSQLTips

MSSQLTips

MSSQLTips.com - your daily source for SQL Server tips
Welcome to MSSQLTips Sign in | Join | Help
in Search

Adding Alias name will improve the performances Or not?

Last post 07-28-2008 8:41 AM by srinivasanrr_wiz. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 07-18-2008 6:34 AM

    Adding Alias name will improve the performances Or not?

    Hi,
     Do anyone can confirm me, i am little bit confused whether using alias
    name will improve the performances Or not? In my point of view, it won't do.
    Because i observed one thing by the CPU time & elapsed time is less, when i did not use alias name in my query. If it's not Helping to improve the performance , why we are using this alias concept?

    Thanks.

  • 07-25-2008 5:26 AM In reply to

    • tosscrosby
    • Top 10 Contributor
    • Joined on 04-15-2008
    • in front of my computer
    • Posts 47

    Re: Adding Alias name will improve the performances Or not?

    I'm assuming you mean aliasing table names within a query? It's there to allow us to use a shortened verison of a table name. Suppose you had 2 tables, TempEmployeeImportReject and TempEmployeeImportInsert (or were joining the same table to itself) with the same column names that you want to query on. I'd rather do "select a.field1, b.field2, a.field3, b.fiel4 (etc.) from TempEmployeeImportReject a, TempEmployeeImportInsert b" than "select TempEmployeeImportReject.field1, TempEmployeeImportInsert.field2, TempEmployeeImportReject.field3, TempEmployeeImportInsert.fiel4 (etc.) from TempEmployeeImportReject, TempEmployeeImportInsert". Sure saves a lot of typing (and is more readable).....It was never designed to improve performance.

  • 07-28-2008 8:41 AM In reply to

    Re: Adding Alias name will improve the performances Or not?

     Hi tosscrosby, Thanks for ur reply. Ur explanation also very clear.

Page 1 of 1 (3 items)