[thelist] CF - MAXROWS

rudy limeback r937 at interlog.com
Sat Jul 22 15:31:43 CDT 2000

> since queries that have a higher blockfactor set require
> more available memory from the server then i would have
> to say that it should be used very sparingly.

multithreaded servers like cf will allocate memory for buffers to hold the
result sets of all concurrently running queries, and they will swap the
least recently used stuff out to disk

and the operating systems that multithreaded servers like cf run on top of
will do the same to the stuff they're running...  which supports the advice
not to run cf and the database engine on the same machine, they will
compete for buffer space

if they are on separate machines, there's not much sense in going back and
forth repeatedly if you can do it in one call

sometimes, executing two unrelated queries in succession (two calls to the
database) is unavoidable

for example, get list of most recent articles in this category, plus get
body text and comments for this specific article -- no way you'd want to do
this in one query (trust me)

but it is when the queries are related that you must be most on guard

for example, get a record, and then, in a cfloop, repeatedly call for its
children -- this is inefficient (especially across machines) and better
done with a join query

adjusting the blockfactor allows you to call for as many records as you
need (e.g. to show on the page) and no more... what would be the point

i have no facts to back this up, but i am certain that upping buffers by
using blockfactor and thereby potentially incurring swap penalties is
always going to win, hands down, no question about it, tko in the first
round, over sending repeated requests across operating system and often
machine boundaries to another specialized server like a database engine and
waiting for it to return something

... and as if the waiting wasn't bad enough, you're likely to get swapped
out for inactivity

database engines are full blown servers too, most of them multi-threaded,
containing uncounted millions of lines of code, just to execute a simple

but once having decoded your sql, they are essentially just as fast at
returning multi-record results sets as single rows...

so instead of using blockfactor sparingly, i would definitely look at each
and every query, figure out how many records you expect or wish to have,
and set blockfactor accordingly

what was the default blockfactor value again?  my cf 4.5 docs simply say
it's optional...


More information about the thelist mailing list