Re: Which "select " is fast,thanks....... ?
| From: | Pierre-Alain Joye | Date: | Sat, 16 Mar 2002 14:56:48 +0000 |
| Subject: | Re: Which "select " is fast,thanks....... ? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-17715@lists.php.net to get a copy of this message | ||
On Sat, 16 Mar 2002 23:03:48 +0800
±i®p»Ê <fongming@host1.tyes.tyc.edu.tw> wrote:
> Hi,all friends:
>
> Would you please tell me which script in MySQL is fast?
> ---------------------------------------------
> 1. select count(*) from bk_data
Never use *
> 2. select count(book_name) from bk_data
always specify fields you need. mysql does not have to look for fields definitions, and last but not
least, your query will more readable :).
pa