Hm.. Wie kann ich aber folgende Abfrage optimieren?
Code:
SELECT DISTINCT news.id, news.is_visible, news.title AS title,
category.title AS category,
ounits1.shorttitle AS faculty,
ounits2.shorttitle AS chair
FROM ((news LEFT OUTER JOIN category ON (news.category_id = category.id))
LEFT OUTER JOIN ounits1 ON (news.faculty_id = ounits1.ounit_id))
LEFT OUTER JOIN ounits2 ON (news.chair_id = ounits2.ounit_id)
ORDER BY news.creation_datetime
Im Moment habe ich zwei gleiche temporäre Tabellen erstellt, ounits1 und ounits2. Aber das ist ja nicht Sinn der Sache...
Und ich hab echt keine Ahnung mehr, was ich da machen könnte...
