Requette trop lourd plante easy php
Fermé
sinifer
Messages postés
312
Date d'inscription
mardi 12 février 2008
Statut
Membre
Dernière intervention
12 mars 2013
-
4 mai 2009 à 11:18
sinifer Messages postés 312 Date d'inscription mardi 12 février 2008 Statut Membre Dernière intervention 12 mars 2013 - 4 mai 2009 à 16:05
sinifer Messages postés 312 Date d'inscription mardi 12 février 2008 Statut Membre Dernière intervention 12 mars 2013 - 4 mai 2009 à 16:05
A voir également:
- Requette trop lourd plante easy php
- Easy php - Télécharger - Divers Web & Internet
- Wetransfer gratuit fichiers lourd - Guide
- Reduire un document trop lourd - Guide
- Easy disk drive repair - Télécharger - Récupération de données
- Easy cleaner - Télécharger - Nettoyage
7 réponses
P@t@ch0n
Messages postés
565
Date d'inscription
mercredi 15 avril 2009
Statut
Membre
Dernière intervention
28 décembre 2009
85
4 mai 2009 à 12:16
4 mai 2009 à 12:16
Je crois que tu n'as aucun index dans tes tables, il serait judicieux d'en créer.
Ta requete n'est pas si lourde que ça.
Ta requete n'est pas si lourde que ça.
sinifer
Messages postés
312
Date d'inscription
mardi 12 février 2008
Statut
Membre
Dernière intervention
12 mars 2013
11
4 mai 2009 à 14:32
4 mai 2009 à 14:32
c'est juste dans relances_gratuites que j'ai pas d'index et comme mes tables on beaucoup de donnée c'est peu être sa qui cloche
sinifer
Messages postés
312
Date d'inscription
mardi 12 février 2008
Statut
Membre
Dernière intervention
12 mars 2013
11
4 mai 2009 à 14:43
4 mai 2009 à 14:43
j'ai regardé pour ajouter des index sur la table relances_gratuites mais sa marche pas
SELECT IF(cu.customers_from LIKE '1st%','1rst',cu.customers_from) AS Origin, COUNT(DISTINCT cu.customers_id) AS effectif, count(co.commandes_status) AS command, AVG(co.commandes_montant) AS Mmc FROM customers cu INNER JOIN commandes co ON cu.customers_id=co.customers_id INNER JOIN relances_gratuites rg ON cu.customers_id=rg.customers_id WHERE co.commandes_status='1' AND rg.relances_gratuites_inscription_date>='2009-04-26' AND rg.relances_gratuites_inscription_date<='2009-04-26' ALTER TABLE relances_gratuites ADD INDEX (relances_gratuites_inscription_date) GROUP BY Origin
P@t@ch0n
Messages postés
565
Date d'inscription
mercredi 15 avril 2009
Statut
Membre
Dernière intervention
28 décembre 2009
85
4 mai 2009 à 14:48
4 mai 2009 à 14:48
Fais un EXPLAIN de ta requete initiale.
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
sinifer
Messages postés
312
Date d'inscription
mardi 12 février 2008
Statut
Membre
Dernière intervention
12 mars 2013
11
4 mai 2009 à 14:53
4 mai 2009 à 14:53
voilà ce que sa me met:
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE rg ALL NULL NULL NULL NULL 337195 Using where; Using temporary; Using filesort
1 SIMPLE co ALL NULL NULL NULL NULL 382065 Using where; Using join buffer
1 SIMPLE cu eq_ref PRIMARY PRIMARY 4 tti_comedie.rg.customers_id 1 Using where
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE rg ALL NULL NULL NULL NULL 337195 Using where; Using temporary; Using filesort
1 SIMPLE co ALL NULL NULL NULL NULL 382065 Using where; Using join buffer
1 SIMPLE cu eq_ref PRIMARY PRIMARY 4 tti_comedie.rg.customers_id 1 Using where
sinifer
Messages postés
312
Date d'inscription
mardi 12 février 2008
Statut
Membre
Dernière intervention
12 mars 2013
11
4 mai 2009 à 15:33
4 mai 2009 à 15:33
Donc si je me réfère au donné c'est bien la table relances_gratuites qui n'a pas d'index
sinifer
Messages postés
312
Date d'inscription
mardi 12 février 2008
Statut
Membre
Dernière intervention
12 mars 2013
11
4 mai 2009 à 16:05
4 mai 2009 à 16:05
ce qui est drôle c'est que quand je fait cette requete j'ai aucun problème sa le fai de suite
SELECT IF(customers_from LIKE '1st%','1rst',customers_from) AS Origin, COUNT(*) AS effectif_vg FROM customers inner join relances_gratuites on customers.customers_id=relances_gratuites.customers_id WHERE customers_client='0' AND customers_emv='0' AND customers_seance ='0' AND relances_gratuites_inscription_date>='2009-04-12' and relances_gratuites_inscription_date<='2009-05-03' GROUP BY Origin