Hi! I have a little pb with indexes. when I make an explain on my query I have strange results. my query looks like this
select * from LIST l, WIN c where l.ID_LIST=c.ID_LIST and l.KEY = '421' and l.ACTIF='1'; table LIST : ID_LIST(primary key), KEY, ACTIF, ... table WIN ID_WIN(primary key), ID_LIST, ... there is 2 indexes. One on (LIST.KEY, LIST.ACTIF) and one on (WIN.ID_LIST) the pb is that explain returns like this : |table|type|possible_keys|key|key_len|ref|rows|Extra |l|ref|PRIMARY,idx_key_actif|idx_key_actif|20|const,const|1|where used; Using index| |c|ALL|ID_LIST |NULL|NULL|NULL|5|where used| which means (if I understood the mysql manual...) it prefers not to use the index from c(WIN table) and scan the whole table for each row from LIST... let me say it's not what I want... can someone explain me why? Internet et mail gratuit AltaVista http://www.altavista.fr --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php