Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

SQL Select * statements

$
0
0

In the never ending battle between developers and infrastructure on why things are slow, I came upon this quote "I've heard that if you do SELECT * the database needs to find out what fields are actually in the table before it can then select them all. By specifying the field names the database engine can use those names straight away rather than having to do an extra lookup."   Is that how it works?  Looking at the queries that are running, most if not all are structured like this:  SELECT * FROM table WHERE this AND that blah, blah blah.  I am not a DBA or a SQL programmer, but I was always told to shy away from using SELECT *. 

Thank you..

 


Viewing all articles
Browse latest Browse all 4871

Trending Articles