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