MySQL Forums
Forum List  »  Newbie

Re: Select * with a function applied to one column
Posted by: Phillip Ward
Date: December 03, 2014 06:33AM

I completely disagree with your argument for retaining "select *".
As you've discovered, it gives you problems. It will continue to give you problems. It's a performance overhead (the database has to read its internal catalogs to work out which columns you need; can be slow, can be a bottleneck). What you get back can change.

Remember; it's not your database.
You only get to work with it from time to time. Other people will do as well.

Always specify the columns that you want in the order that you want them. Yes, it can be a lot of typing for little, visible benefit, but it is the better way to go.

All too often "Select *" goes hand in hand with sloppy, index-based column processing. If the columns are reordered, as DBAs are wont to do from time to time (mischievous little munchkins that we are), these applications crash and burn spectacularly.

Save yourself the heartache; wean yourself off the "Select *" habit.

Regards, Phill W.

Options: ReplyQuote


Subject
Written By
Posted
Re: Select * with a function applied to one column
December 03, 2014 06:33AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.