Why don't you try loading the query into an application variable? In your
application.cfm (or equivalent) check to see if the variable is initialized
(remember to use a read-only lock for this). If it isn't, do your database
read, and then load the results of that query into an application variable
(this will require an exclusive lock - but just lock the CFSET, not the
CFQUERY). That way, the only time that the query will need to be executed
is when the application times out. You will also need to use a read-only
lock whenever you reference this application variable, but that shouldn't be
too complicated or add too much overhead. If you want to force a refresh of
the values, set up a task that simply requeries and reloads that application
variable.
I'm doing this on a couple of sites with a bunch of queries that populate
drop down list boxes and it's working well for me.
Bob
-----Original Message-----
From: Jon Hall [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 29, 2000 5:29 PM
To: CF-Talk
Subject: Re: DB vs. text file
We recently ran into a problem where the database was so huge that pulling a
list box was too slow. The solution was to perform a query that wrote the
contents of the select box to a comma delimited file once a day. In this
case, it was much much faster to read the box from a file.
jon
----- Original Message -----
From: "Robert M. Saxon, Jr." <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, September 29, 2000 3:55 PM
Subject: DB vs. text file
> I am thinking about populating a select box with a list from a text file.
> Is that faster than querying a database, or should I import the text file
> into a table?
>
> I'm sure there is no absolute answer to this question, but generalities
are
> acceptable.
>
> Thanks,
>
> Rob
>
> --------------------------------------------------------------------------
----
> Archives: http://www.mail-archive.com/[email protected]/
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.