Jônatas Zechim wrote:
> Can you dump the table structure to show us how you've set it up?
>
> Bastien
>
> Cat, the other other white meat
>
>
>
> Yeah, that’s it:
>
>
>
> CREATE TABLE `ctalk_admin` (
>
> `admin_id` int(9) NOT NULL auto_increment,
>
> `admin_nome` varchar(50) NOT NULL,
>
> `admin_login_nome` varchar(32) NOT NULL,
>
> `admin_pass` varchar(32) NOT NULL,
>
> `admin_login` int(10) NOT NULL,
>
> `admin_lastping` int(10) NOT NULL,
>
> PRIMARY KEY (`admin_id`),
>
> KEY `admin_lastping` (`admin_lastping`)
>
> ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
>
>
I would add a second column to that admin_lastping KEY
KEY `admin_lastping` (`admin_lastping`, `admin_id`)
Since you are using both columns in your where clause, they both need to be
specified /in the same/ index for and index to be used.
Otherwise, some random index might be used. But you will get the best
performance if both are listed in the same index.
--
Jim Lucas
"Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them."
Twelfth Night, Act II, Scene V
by William Shakespeare
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php