What is the reason not to use select * ?

Posted by Chris Lively on Stack Overflow See other posts from Stack Overflow or by Chris Lively
Published on 2008-11-26T16:22:49Z Indexed on 2010/05/05 23:48 UTC
Read the original article Hit count: 162

Filed under:
|

I've seen a number of people claim that you should specifically name each column you want in your select query.

Assuming I'm going to use all of the columns anyway, why would I not use SELECT *?

Even considering the question from 9/24, I don't think this is an exact duplicate as I'm approaching the issue from a slightly different perspective.

One of our principles is to not optimize before it's time. With that in mind, it seems like using SELECT * should be the preferred method until it is proven to be a resource issue or the schema is pretty much set in stone. Which, as we know, won't occur until development is completely done.

That said, is there an overriding issue to not use SELECT *?

© Stack Overflow or respective owner

Related posts about sql

Related posts about best-practices