sql optimization, comments on queries