Ich brauche eine Abfrage zu beschleunigen. Ist eine Indextabelle, nach der ich suche? Wenn ja, wie mache ich einen? Muss ich jedes Insert updaten?Was ist eine MySQL-Index-Tabelle?
Hier sind das Tabellenschema:
--table1-- | --tableA-- | --table2--
id | id | id
attrib1 | t1id | attrib1
attrib2 | t2id | attrib2
| attrib1 |
Und die Abfrage:
SELECT
table1.attrib1,
table1.attrib2,
tableA.attrib1
FROM
table1,
tableA
WHERE
table1.id = tableA.t1id
AND (tableA.t2id = x or ... or tableA.t2id = z)
GROUP BY
table1.id