SQL optimization conducted.