MySQL Forums
Forum List  »  German

Abfrage optimieren/korrigieren
Posted by: Hannes Hörting
Date: January 29, 2010 04:19AM

Hallo,

ich habe einige Tabellen, wo ich eine Abfrage zusammenstellen muss:
Tabellen:
journal
journalpos
artikel

SELECT Kun_Name1, rdatum FROM journal j left outer join Journalpos jpos on j.REC_ID = jpos.journal_id
where j.vrenum like "RE-%" AND j.RDATUM like "2009-12-%"
and jpos.artnum = any (select al.artnum from artikel al where al.hersteller_id = 294);

Die ANY Abfrage läßt den mysql Server fast aufhängen und er liefert keine daten zurück.
Ersetze ich die ANY Abfrage mit einem Beispielwert kappt alles.

Scheint als habe ich eine uneffiziente oder falsche Query geschrieben ... kann jemand den Fehler finden?

Ich muss das ganze dann noch weiter verfeinern, aber hier scheitere ich schon mal.

Danke!

Options: ReplyQuote


Subject
Views
Written By
Posted
Abfrage optimieren/korrigieren
3753
January 29, 2010 04:19AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.