MySQL Forums
Forum List  »  Italian

where con function
Posted by: marco pilolli
Date: June 01, 2011 07:32AM

salve,
ho 2 server
il primo con una vecchia release di mysql (5.0.qualcosa)
se faccio un explain di una select tipo
select a from table where b=funzionepersonalizzata(data,idutente)

mi dice che usa l'indice del campo B

nel nuovo server con mysql 5.1.54 (quello del pacchetto di ubuntu server 11.04)
la stessa select non usa più l'indice e mi scorre praticamente tutta la tabella impiegandoci circa 7 sec x l'esecuzione

dove sta la differenza?

il nuovo server è il dump dei dati e della struttura del vecchio

Options: ReplyQuote


Subject
Views
Written By
Posted
where con function
3405
June 01, 2011 07:32AM
1768
June 07, 2011 02:38AM
1397
August 21, 2011 06:55PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.