Bonjour,
J'ai un update sur plusieurs tables qui marche sur 2 ou 3 tables liées, mais dès que je les passe à 10 ou 15 tables, avec seulement 500 enregistrements sur la table principale, j'obtiens une erreur :
Est-ce normal ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part Erreur : The table '' is full
Voilà ce que me donne un explain de ma requête (j'ai remplacé le Update par Select pour obtenir l'Explain) :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13 EXPLAIN SELECT t1 . * FROM `demo_art` AS t1 LEFT JOIN `demo_ach_det` AS t2 ON t2.`id_art` = t1.`cle_art` LEFT JOIN `demo_art_lk` AS t3 ON t3.`id_art` = t1.`cle_art` LEFT JOIN `demo_art_lk` AS t4 ON t4.`id_art_cible` = t1.`cle_art` LEFT JOIN `demo_art_top` AS t5 ON t5.`id_art` = t1.`cle_art` LEFT JOIN `demo_cde_det` AS t6 ON t6.`id_art` = t1.`cle_art` LEFT JOIN `demo_fact_det_base` AS t7 ON t7.`id_art` = t1.`cle_art` LEFT JOIN `demo_fact_part_det` AS t8 ON t8.`id_art` = t1.`cle_art` LEFT JOIN `demo_parc_obso` AS t9 ON t9.`id_art` = t1.`cle_art` LEFT JOIN `demo_propale_det` AS t10 ON t10.`id_art` = t1.`cle_art` LEFT JOIN `demo_stk_det` AS t11 ON t11.`id_art` = t1.`cle_art` LEFT JOIN `demo_entr_art_interdits` AS t12 ON t12.`id_art` = t1.`cle_art`Vous pouvez voir que j'ai bien défini mes jointures, mes index, notamment les "rows" qui ne sont pas abusives.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13 id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 602 1 SIMPLE t2 ref id_art id_art 3 t1.cle_art 1 Using index 1 SIMPLE t3 ref id_art id_art 3 t1.cle_art 1 Using index 1 SIMPLE t4 ref id_art_cible id_art_cible 3 t1.cle_art 1 Using index 1 SIMPLE t5 ref id_art id_art 3 t1.cle_art 4 Using index 1 SIMPLE t6 ref id_art id_art 3 t1.cle_art 13 Using index 1 SIMPLE t7 ref id_art id_art 3 t1.cle_art 11 Using index 1 SIMPLE t8 ref id_art id_art 3 t1.cle_art 10 Using index 1 SIMPLE t9 ref id_art id_art 3 t1.cle_art 4 Using index 1 SIMPLE t10 ref id_art id_art 3 t1.cle_art 1 Using index 1 SIMPLE t11 ref id_art id_art 3 t1.cle_art 1 Using index 1 SIMPLE t12 ref id_art id_art 3 t1.cle_art 9 Using index
J'ai également lancé :
Ce qui m'étonne, c'est comme je le disais plus haut, d'avoir ce message pour seulement 500 entrées dans ma table principale, alors que je pensais que ce genre d'erreurs viendrait avec 50.000 ou 100.000 enregistrements.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 $res_tmp = mysql_query("SET BIG_TABLES=1"); $res_tmp = mysql_query("SET OPTION SQL_BIG_SELECTS=1");
Est-ce que quelqu'un aurait une idée ?
Merci à vous
Partager