MySQL LEFT JOIN AND ORDER BY ERROR?

I'm working on some code and I came across some problems.

I have 2 tables "Table1" and "Table2" and I wanna combine both of them (LEFT JOIN). When I do everything works fine. But when I add ORDER BY at the end my website stops working for a few minutes.

The code:

SELECT table1.id, table2.id 
FROM table1 
    LEFT JOIN table2 ON table1.id=table2.id 
ORDER BY table1.name 
LIMIT 0, 20 

for some reason this code crashes the server. any help would be appreciated!