How can I apply heuristics to optimise an expression tree?
I've just figured out how to do this, so I'll answer it in case anyone else has a similar problem.


Introduced SELECTs as far down the tree as possible, to reduce the number of comparisons needed.
Introduced PROJECTs as far down the tree too, to reduce the number of columns.
Used a JOIN wherever a CARTESIAN PRODUCT was followed by a SELECT. (There weren't any in my tree but this is what's done apparently).


My final tree looks like this: