Estimating temporary storage

The amount of temporary storage required is determined by the size of the result set to be returned. For example, if 150,000 rows of 1200 bytes are to be returned, 180,000,000 bytes of temporary storage are required to hold the result set.