What techniques can be applied effectively to improve the performance of SQL queries? Are there any general rules that apply?