Re: showing warnings

From: Date: Tue, 11 Sep 2007 10:35:42 +0000
Subject: Re: showing warnings
References: 1 2 3  Groups: php.db 
Request: Send a blank email to php-db+get-43992@lists.php.net to get a copy of this message
On 9/11/07, Niel Archer <not@chance.now> 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/

« previous php.db (#43992) next »