Array Looping Much Faster Than Query Looping