In this blog post, i will tell you why you should not use following query structure with SQL Azure:
select * from [tablename]
1) ‘ * ‘ is bad for performance. This is the fact that is pointed out in most of the performance tuning learning series. It is a good practice to retrieve only the columns that are required.
Apart from this – there is one more reason.
2) If you look at the contemporary pricing model of SQL Azure, you will notice that with SQL Azure, we are charged with the data transfer that takes place with the SQL Azure database. The cost is directly proportional to the amount of data that is transferred in and out of the data center. Note that if we have our app on Azure platform and it is hosted in the same data center as that of our SQL Azure database, then no cost will be applied but in other scenario’s, data transfer cost apply.
So, if you retrieve column that is not used then you will be unnecessarily wasting money. Thus avoid using ‘select * ‘ wherever possible!
0 thoughts on “Two reasons why a Data Technologist should avoid ‘select * ………’ with SQL Azure”
Is extremely good post
thank you. it was helpful.