Hi Ryan,

there are many reasons why you shouldn't pull data with "Select *"

1. You have some overhead for the database to create the List of the 
columns to retrieve
2. You pull unnecessary data causing more CPU utilization and mainly lot 
of network traffic. Just imagine the table having a MEMO field in it
3. Since the query analyzers of the database server generates an 
execution best suited for performance using * will almost allways 
generate bookmark lookups which hurt performance
4. In the source code you do not know which columns you get in the resultset
5. The code in fact is much easier to read
6. Using INNER JOINS can cause ambiguous references if two columns are 
named the same

but I must admit i do it the same way sometime just out of lazyness.
But only if I know what results are expected.

Greetings / GrĂ¼sse
Gert Franz
Customer Care
[EMAIL PROTECTED]
www.railo.ch

Join our Mailing List / Treten Sie unserer Mailingliste bei:
deutsch: http://de.groups.yahoo.com/group/railo/
english: http://groups.yahoo.com/group/railo_talk/



Ryan, Terrence schrieb:
> I have a dumb question. Can someone point me to a definitive explanation
> of why select * in SQL is bad?   
>
> I've found this : http://www.adopenstatic.com/faq/selectstarisbad.asp
> but I  don't thing it effectively counters the argument "But I need all
> of the columns in the table."
>
> Mind you, that I'm not looking for convincing for myself, rather I'm
> doing a code review, and want to be have a stronger footing for saying:
> "Get rid of the select *'s."
>
> Terrence Ryan
> Senior Systems Programmer
> Wharton Computing and Information Technology       
> E-mail:         [EMAIL PROTECTED]
>
>
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:246138
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to