I am trying to fetch data from a SQL DB via PHPmyAdmin but it takes ages to excute my query. Do you have any idea how to speed up my query ?
My DB has the following structure
Table joueurs
| id_joueur | mail |
Table paires
| paires.annee | idj1 | idj2 |
Thanks alot
/* mail from all players being first memeber of a pair (idj1)
in 2015, 2016 and 2017 and removing doubles*/
SELECT
mail
from
joueurs
where
(joueurs.id_joueur in
(SELECT idj1
FROM paires
WHERE (paires.annee = 2015 OR paires.annee = 2016 OR paires.annee = 2017)
)
)
GROUP BY mail
HAVING COUNT(*) > 0