Concerns on gathering a large query.

Question - When a large sql query is run and it returns to a @results
array how large can this be? Is there a better method of storing this
info? I can limit the Browsers display with Pagination but I'm
concerned on the Array storing.

My current query is a date range query. If you select a large enough
value the returned result could be very large and over time it will
continue to grow for sure. What other ways can a large query be
handled in ROR?

Thanks
Sc-

Question - When a large sql query is run and it returns to a @results
array how large can this be? Is there a better method of storing this
info? I can limit the Browsers display with Pagination but I'm
concerned on the Array storing.

'How long is a piece of string?'. I don't think there is a hard limit
other than memory, but you'll probably hit usability limits before (eg
a page showing 10,000 rows of data would be horrible to use). If
you're doing your pagination right, at any point you will only have
the data for the current page in memory.

Fred

Thanks Frederick – Super quick response. So far I have enabled my page view results to be 50 , toss up a warning on the collected results total and its working. But the array itself still contains the entire set correct?

sc

Thanks Frederick -- Super quick response. So far I have enabled my
page view results to be 50 , toss up a warning on the collected
results total and its working. But the array itself still contains
the entire set correct?

It depends on what you're doing. I certainly wouldn't load the whole
collection only to use 50 of them. Things like will_paginate will get
this right for you

Fred

Thanks again -- Thats exactly what I'm using. I just watched a
railscast on Endless pagination. Very nice indeed.

Sc-

You can limit the rows returned by changingf the find(:all) in the
controller to a more appropriate number of records.