I think we answered the ambig problem - most decent servers would flunk at
this anyhow.





"This e-mail is from Reed Exhibitions (Oriel House, 26 The Quadrant,
Richmond, Surrey, TW9 1DL, United Kingdom), a division of Reed Business,
Registered in England, Number 678540.  It contains information which is
confidential and may also be privileged.  It is for the exclusive use of the
intended recipient(s).  If you are not the intended recipient(s) please note
that any form of distribution, copying or use of this communication or the
information in it is strictly prohibited and may be unlawful.  If you have
received this communication in error please return it to the sender or call
our switchboard on +44 (0) 20 89107910.  The opinions expressed within this
communication are not necessarily those expressed by Reed Exhibitions." 
Visit our website at http://www.reedexpo.com

-----Original Message-----
From: Gert Franz <[EMAIL PROTECTED]>
To: CF-Talk <cf-talk@houseoffusion.com>
Sent: Tue Jul 11 17:59:25 2006
Subject: Re: Select * in SQL

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:246146
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