Ryan, Terrence wrote:
> I have a dumb question. Can someone point me to a definitive explanation
> of why select * in SQL is bad?   

#1 - if you provide column names, Coldfusion doesn't have to figure them 
out.

#2 - If you don't need all the columns, don't retrieve them all.  It can 
dramatically increase the speed of the query because less data has to be 
returned - especially if you're returning clobs and such that you don't 
necessarily need.

#3 - you'll avoid crazy errors like "7 <= 7".  WTF does that mean?  It 
means you're doing a "select *" and then you added/removed columns from 
the table and then did "select *" again.  You don't want to go there! 
Avoid meaningless errors by specifying column names :)

Rick



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/cf_lists/message.cfm/forumid:4/messageid:246145
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to