Schorsch: MySQL: Warum 8.76 Sekunden?

Beitrag lesen

Guten Tag

Warum braucht folgende Abfrage bei gesundem System
8.76 Sekunden?

SELECT DISTINCT t.title_id, t.title_title
FROM title AS t, author AS a
LEFT JOIN keyw_junc AS kj ON kj.title_id=t.title_id
LEFT JOIN author AS a1 ON a1.author_id=t.author_id
LEFT JOIN author AS a2 ON a2.author_id=t.coauthor_id
LEFT JOIN author AS a3 ON a3.author_id=t.editor_id
LEFT JOIN author AS a4 ON a4.author_id=t.coeditor_id
WHERE a1.author_first='edgar'

So dauert es 0.0047 Sekunden:
SELECT t.title_id, t.title_title
FROM biblio_title AS t, biblio_author AS a
LEFT JOIN biblio_keyw_junc AS kj ON kj.title_id=t.title_id

Und so dauert es 0.0455 Sekunden:
SELECT DISTINCT t.title_id, t.title_title
FROM biblio_title AS t, biblio_author AS a
LEFT JOIN biblio_author AS a1 ON a1.author_id=t.author_id
LEFT JOIN biblio_author AS a2 ON a2.author_id=t.coauthor_id
LEFT JOIN biblio_author AS a3 ON a3.author_id=t.editor_id
LEFT JOIN biblio_author AS a4 ON a4.author_id=t.coeditor_id
WHERE a1.author_first='edgar'

Es sind rund 400 Datensätze.
Kann mir jemand erklären, wie ich meine Abfrage gestalten muss, damit diese in vernünftiger Zeit zustande kommt?

Gruss
Schorsch