MySQL Forums
Forum List  »  German

Re: Simpler Join: Komplette Tabelle wird gescannt
Posted by: Thomas Wiedmann
Date: December 15, 2012 02:55PM

Hallo Gregor,

danke für das gut vorbereitete Beispiel.

In Deinem SQL fehlt im Prinzip eine WHERE Klausel oder ein ORDER BY an dem MySQL erkennen kann, wann LIMIT 5 zutrifft.

Probier mal
SELECT wetten.id
  FROM wetten_wetten AS wetten
 INNER JOIN wetten_wetten_teams AS wt1
         ON wt1.wette = wetten.id
ORDER BY wetten.id
LIMIT 5

Grüße
Thomas

Options: ReplyQuote




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.