We had a tracer active on our CF server a while back to find out just that.
Although I'm not an expert in the field, it appeared the DB was only hit
once for the entire page request. (i.e. as opposed to hitting DB on every
instance of #client.username#)
-----Original Message-----
From: Brad Roberts [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 29, 2001 11:48 AM
To: Fusebox
Subject: RE: Client Vars
Thanks for the link Erki.
>From Fusion Authority
(http://www.fusionauthority.com/alert/index.cfm?alertid=76#tech2):
"Did you know that, if you have client variables turned on,
CF will generate two select statements for every single page hit?
And, if you don't turn off global client variable updates
(which are turned on by default), you also generate an INSERT/UPDATE
statement for every page, even if you aren't accessing any client
variables on that page."
Can this be proven? I understand the query to get the client variables at
the beginning of the page request, but why 2 select statements? These
queries don't show up in the debug output, so how can you test this?
Plus, is it safe to assume that CF queries the database once, and then holds
the client vars in memory for the remainder of the page request - as opposed
to querying the db every time you reference a client var?
Brad
> -----Original Message-----
> From: Erki Esken [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 29, 2001 11:03 AM
> To: Fusebox
> Subject: Re: Client Vars
>
>
> > When you store client vars in a database, does CF do an update to
> > the database every time you set a client variable? Or, does it do
> > one update at the end of the page request?
>
> See this article, it explains a lot about client variables (also how many
> times CF hits the client var DB on each request):
>
> http://www.fusionauthority.com/alert/index.cfm?alertid=76#tech2
>
> -erki
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists