I was looking at ways to squeeze a bit more performance out of a query yesterday, and came accross this:
Take this example (structure doesn’t really matter):
FROM table1
LEFT JOIN table2 ON table1.fk=table2.pk
LEFT JOIN table3 ON table1.fk2=table3.id
WHERE table1.field=’123′ |
ORDER BY table1.field2
LIMIT 20, 30
If you’ve got a lot of joined records in table2 or 3, then the [...]