select a.id_bundesland, b.bundesland from base_bundesländer a left join (select id_bundesland, bundesland from base_bundesländer_lang where id_sprache=1) b on (a.id_bundesland=b.id_bundesland) order by b.bundesland descmy last mail contained the wrong query.
the above query is exactly the same as
select a.id_bundesland, b.bundesland from base_bundesländer a left join base_bundesländer_lang b on (a.id_bundesland=b.id_bundesland and b.id_sprache=1) order by b.bundesland desc
According to explain, the improved query does use the primary key of base_bundesländer_lang (id_bundesland, id_sprache) but the first query does not.
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general
