Select * vs Select column names ?
Posted on 2008-10-16
Recently we have big discussion in company why to use or not to use Select * in our SP's and there were many "for and against" so i need some expert opinions.
We all agreed that additional I/O is against, aditional "query" need to be put against table for retriving those column names when u you put * wich is again against.
But on the other hand we all programming with classes and mostly our classes looks like tables and filling classes with SP most of the time require all fields, especilly if you fill your class with several SP's then altering table need all SP+s to be altered too wich with select * wont be issue.
When i mean on Select * and using many SP's to "fill" your same class you will use
Select tableName.*, otherFileds.... from tableName join other table ... wich again will work fine with changing your table columns.
Checking execution plan i didnt get any different plans using * or not.
Is there anything i am missing here or actually Select * in some cases will be much better solution then using column names ?