Bonjour
Je viens vers vous car j'ai un probleme c'est temps ci. J'ai une table SQL trés grosse et l'accés a mes données prennent 20 secondes ...
La requete en question :
$req2=mysql_query("SELECT id,country,place,gps,type,longueur,niveau,duree,vu FROM places WHERE assoc='0' AND status<5 AND country IN ('FR','ES','IT','GB') ORDER BY vu DESC LIMIT 100");
Ma table "places" fait 568 214 enregistrement soit 146 Mo
Voici la structure de ma table :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| 1 id int(10) Non Aucune AUTO_INCREMENT
2 country varchar(5) utf8_general_ci Non Aucune
3 place varchar(250) utf8_general_ci Non Aucune
4 gps varchar(250) utf8_general_ci Oui NULL
5 localisor int(10) Non 0
6 type varchar(250) utf8_general_ci Oui NULL
7 vu int(10) Non 0
8 date_add datetime Non Aucune
9 i_custom text utf8_general_ci Oui NULL
10 i_wiki text utf8_general_ci Oui NULL
11 i_routard text utf8_general_ci Oui NULL
12 i_fute text utf8_general_ci Oui NULL
13 population int(10) Oui NULL
14 surface int(10) Oui NULL
15 acces varchar(250) utf8_general_ci Oui NULL
16 acces1 text utf8_general_ci Oui NULL
17 duree varchar(250) utf8_general_ci Oui NULL
18 longueur varchar(250) utf8_general_ci Oui NULL
19 niveau varchar(250) utf8_general_ci Oui NULL
20 circuit longtext utf8_general_ci Oui NULL
21 contributor int(10) Oui NULL
22 assoc int(10) Non 0
23 status int(1) Non 0 |
Voici un exemple d'enregistrement :
579070 ES Requena Casa Medina Requena 39.484306,-1.098479 0 vtt 0 2015-07-03 18:07:59 larga y dura NULL NULL NULL NULL NULL NULL NULL 2h48 43,31 3 NULL NULL 0 0
Si quelqu'un sait ce qui fait ramer et comment y remédier .....
Merci par avance
Partager