You are here: Re: What is quicker as Select? « PHP Programming Language « IT news, forums, messages
Re: What is quicker as Select?

Posted by Erwin Moller on 07/20/05 11:48

bettina@coaster.ch wrote:

> I read somewhere that to gain efficiency it is advisable to avoid the
> use of select. But they don't explain why or what to use instead. Is it
> true? I habe a problem of speed (better to say of NO SPEED) but I don't
> know if it has something to do with the use of select.
> Waht can I use instead?

Hi,

Not sure, but maybe you misunderstood, and confused the above with SELECT *
and SELECT column1, column2.

SELECT * FROM tblusers;

is slower than

SELECT userid, username FROM tblusers;

So naming the columns is faster than using *, even if you select all
columns.
Reason is that the database has to retrieve the real columnnames first and
replace * with it, before executing the query.

Don't expect huge benefits though.

Besides that: If you use * instead of naming the columns, and the columns
you need are just a small subset of all columns, the naming of columns
clearly will be lot faster because the database has to deliver less data.

Regards,
Erwin Moller

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация