Quick SQL efficiency update. Probably works...