> Hello all,
>
> does anyone have any feedback whether there is any difference in the
> efficiency of the following query on a fairly large dataset
>
> 1. select * from tbl

This will be the slowest.

> 2  select count(*) from tbl

This will be very fast since MySQL is optimized for it (the number is
updated when a row is inserted, so the query doesn't actually count all the
rows).

> 3. select field1,field2,field3 from tbl

This will be faster than select * since it doesn't have to fetch as much
data.

See http://www.mysql.com/doc/Q/u/Query_Speed.html for more information.


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to