nalbee
October 24, 2017, 5:36pm
1
curious if anyone has ever tested how many records/rows a cfquery can handle? Is there a limitation or is the limitation available memory? And if So how would I compute what my limits might be. Dealing with some large record sets that may not be able to be reduced.
Thanks,
yeah, memory is the limiting factor. You can always just assign more to lucee
the other option is to use cfquery lazy=true which doesn’t load the whole resultset
I suggest not worrying about it first, just try it out and then tweak your approach if you encounter problems
@nalbee In addition to what @Zackster suggested, you could also paginate through the data with maxRows
and some sequential identifier (id row).
Depending on your underlying SQL engine/version, I would paginate with the SQL techniques specific to your engine/version.
SQL2012+ you could use: OFFSET x ROWS FETCH NEXT y ROWS ONLY
Overview of OFFSET and FETCH Feature of SQL Server 2012 ,
or MySQL you could use LIMIT y OFFSET x
In this tutorial, you will learn how to use MySQL LIMIT clause to constrain the number of rows returned by the SELECT statement.
Est. reading time: 7 minutes
HTH
– Denny