thrashing sql change