I am looping through a huge query, upto 800K records to do a bunch of
calculations. Basically, comparing dates, adding dates, and counting depending
on the condition.

I pass the query from one component (database query component) to the
component that loops through the query and performs the calculations.

My RAM usage jumps 250 to 300 megs when the this report is run. I am not
building any arrays or anything like that; so not sure why it is jumping. I'm
just adding numbers and doing if statements. My thought is maybe a query is
passed by value instead of reference but no idea how to force CF to pass by
reference. This is only one call.

Thank you for any help in advance.