Selective SQL execution