Yesterday I was solving (again) a problem on an sql clause that did not perform well enough.
When I solve this kind of problems I usually draw a picture of the query: tables, joins, where conditions etc. Just yesterday I got a great idea: use the ER model as the base for the drawing! So print out the ER model and draw the aliases, joins, wheres etc on that picture. You will save time and the drawing looks very clear!
I did solve the problem and the ER helpped me a lot: missing join, too many outer joins (on tables where the relationship is mandatory) etc.
Feel free to use this tip unless you are already using this method.