List:General Discussion« Previous MessageNext Message »
From:Eduardo Arino de la Rubia Date:May 31 1999 12:40am
Subject:Re: Quick select question
View as plain text  
also... one BIG thing to always remember is that the * charachter,
although useful in debugging, is a VERY dangersous thing to use in
production code.   rememmber that if the underlying relational schema
changes even one bit and you are expecting rows in a certain order, and
then * gives you whatever the hell it wants, your code is officially
worthless...

free advice, from someone who's had to pay dearly for that one ;)

--ed

-------------------------------------------------------------------------------
1 + 1 = 3, for large values of 1. |     ed@stripped    | arino@stripped
-------------------------------------------------------------------------------

On Sun, 30 May 1999, Sasha Pachev wrote:

> Darren Sweeney wrote:
> > 
> > Hi
> > 
> > This maybe a total SQL question, I don't know if different dB's work different
> ways.
> > 
> > I have a table with approx 20 columns.
> > 
> > If I only need 2 of the columns I still do:
> > 
> > SELECT * FROM users WHERE ( username like '$form{'USERNAME'}' )
> > 
> > and then use an array to pull, let's say $user[4] and $user[12]
> > 
> > Is there any speed/server load benefit on simply pulling the 2 columns needed,
> like:
> > 
> > SELECT username,password FROM users WHERE ( username like '$form{'USERNAME'}' )
> > 
> > Thanks all
> > 
> > Darren
> 
> The second version should work faster in most cases, as you are
> transferring less data between the server and the client.
> 
> -- 
> Sasha Pachev
> http://www.sashanet.com
> 
> ---------------------------------------------------------------------
> Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
> posting. To request this thread, e-mail mysql-thread4196@stripped
> 
> To unsubscribe, send a message to the address shown in the
> List-Unsubscribe header of this message. If you cannot see it,
> e-mail mysql-unsubscribe@stripped instead.
> 

Thread
Quick select questionDarren Sweeney31 May
  • Re: Quick select questionSasha Pachev31 May
    • Re: Quick select questionEduardo Arino de la Rubia31 May