Re: showing warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/11/07, Niel Archer <not@xxxxxxxxxx> wrote:
> >
> > mysql> explain SELECT Tune_Name,Tune_Type FROM Mobile_Tunes;
> > +--------------+------+---------------+------+---------+------+------+-------+
> > | table        | type | possible_keys | key  | key_len | ref  | rows |
> >  Extra |
> > +--------------+------+---------------+------+---------+------+------+-------+
> > | Mobile_Tunes | ALL  | NULL          | NULL |    NULL | NULL |    4 |
> >        |
> > +--------------+------+---------------+------+---------+------+------+-------+
> > 1 row in set (0.00 sec)
> >   mysql>
>
> This shows you have NO indexes on the table.  Assuming that 'Tune_Name'
> contains unique entries for each row, I'd suggest you do the following
> as a minimum:
>
> ALTER TABLE Mobile_Tunes ADD PRIMARY KEY (Tune_Name);

How's that going to help if he's getting all records from the table?

Also there's no way a database is going to use an index if there are
only 4 rows in the table.

-- 
Postgresql & php tutorials
http://www.designmagick.com/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux