Jim Lucas wrote: > <snip> > 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. > > This is definitely not true in MySQL 5 and I'm sure other RDBMS systems. MySQL 5 can use more than 1 index per table now. Also, if you're using the InnoDB engine, the Primary Key is stored in the secondary index, so specifying it explicitly is unnecessary. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php