private int[] getRanges() {
		int max, quo, rem, i;
		int[] ranges = new int[POOL_SIZE];

		max = getResultSize();
		if (max < 0) {
			return null;
		}

		//Output count so user knows how many records will be tested
		System.out.println("Testing " + max + " records.");
		
		// Get remainder after dividing by number of threads
		rem = max % POOL_SIZE;
		// Get quotient after dividing by number of threads
		quo = max / POOL_SIZE;

		// Special case if POOL_SIZE is greater than result size
		if (quo == 0) {
			for (i = 0; i < POOL_SIZE; i++) {
				if (rem-- > 0) {
					// Each thread will process one row
					ranges[i] = i + 1;
				} else {
					// Flag remaining ranges as invalid
					ranges[i] = -1;
				}
			}
		} else {
			max = quo;
			for (i = 0; i < POOL_SIZE; i++) {
				// Check for rows in the remainder
				if (rem > 0) {
					// Add extra row to cover remainder row
					max++;
					rem--;
				}

				ranges[i] = max;
				// Increment max to the end of the next range
				max += quo;
			}
		}

		return ranges;
	}