CLC-3562 Query in batches of 500