On 9/26/06, Che Vilnonis <[EMAIL PROTECTED]> wrote:
> Wait for Scorpio (CF8). This was just answered on the list a few weeks ago.
> Try one of these links:
Not exactly 100%
And no, that is not a promise or a public commitment (yet). ;-) --- Ben
~~~
Casey
~
On Wednesday 27 September 2006 14:32, James Smith wrote:
> And that would prevent any injection attempts. I could then cache the
> queries the regular way, no?
It will execute slower than a query that uses cfqueryparam though.
--
Tom Chiverton
Helping to vitalistically bully end-to-end bandwidt
I did think of storing them in a session/application scope but to be honest
I am currently thinking I can safely ignore text fields as any single quotes
would be excaped anyway, I can then do...
do the sql
And that would prevent any injection attempts. I could then cache the
queries the regular
On Tuesday 26 September 2006 19:30, Snake wrote:
> You don't want to store in sesison scope, otherwise a copy of the query
> will be stored for each and every visitor, which could result in jrun using
> up all the available memory.
It *could*, but you'd need a lot of visitors on a very under spec'
o: CF-Talk
Subject: RE: Cached queries
Or, you could store your queries within persistent memory variables
(Session, Application, Server).
This might be a better link to help: http://tinyurl.com/kou23
-Original Message-
From: James Smith [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 26, 2
Or, you could store your queries within persistent memory variables
(Session, Application, Server).
This might be a better link to help: http://tinyurl.com/kou23
-Original Message-
From: James Smith [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 26, 2006 1:08 PM
To: CF-Talk
Subject: C
You can make a function that caches the query object in the application scope.
Have the function return type be "query", and when the query is called, check
the cache time and re-run the query if the cache has expired.
~|
Intro
Wait for Scorpio (CF8). This was just answered on the list a few weeks ago.
Try one of these links:
http://www.google.com/custom?domains=www.houseoffusion.com%3Bwww.fusionautho
rity.com&q=cachedWithin&sa=-%3E&sitesearch=www.houseoffusion.com&client=pub-
9987223904467795&forid=1&channel=3811075283&i
Because of the way memory usage is related to JVM garbage collection
and other processes, I agree with Barney that load testing of your
whole app with your data is the best way to see if you have problems,
rather than trying to put together a picture based on measurements of
individual bits of the
<< I'm a huge fan of the "build well, optimize later" approach to
programming. Build your app as well as you can, using the simplest
means reasonable, and be confident that the app is more than good
enough until it's objectively demonstrated not to be. >>
Yep, that's the approach I take too. I
If you really care that much, you're going to be doing some pretty
in-depth load testing anyway, so you can vary the different cache
amounts (query cache, other manual caches) and get app-specific
results. And even then, it's still irrelevant what the absolute
efficiency of the query cache is. It
<< Honestly, you really ought not to care. >>
The reason I care is that when you're using a large number of cached queries of
differing (sometimes variable) sizes in a large, highly loaded, dynamic
environment, it's not at all easy to know how many queries you ought to cache,
nor what sort of
Honestly, you really ought not to care. I'd say it's safe to assume
that MM made it operate as quickly and efficiently as possible. If
the functionality the built-in cache uses is sufficient for your
needs, it's very likely it'll be faster than anything you can build in
CFML (simply because the b
When you use the "cached*" attributes of cfquery, i think it displays the
fact that it was cached in the space in debug where the query time is
usually shown.
Aaron
- Original Message -
From: "Andy Jarrett" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, October 25, 20
> From: Les Irvin
>
> I would like to carry query results across a number of pages
> as users move through the site without having to perform the
> query on each page.
>
> I understand persistant queries with the "cachewithin"
> attribute but that's not possible with this query as it
> incl
Just stick the query object in a shared scope. If it's user specific, then
the session scope would be the way to go, otherwise application.
SELECT ...
Just keep in mind that the query will not expire until the application scope
expired (two days without a request by default, I believe). So
> > There are many reasons why queries may run slowly or
> > quickly, of course.
>
> I suppose all you can really do is benchmark the various
> methods in your own app...
This, of course, is the secret to success with any web application.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.c
On Tuesday 06 Apr 2004 19:09 pm, Dave Watts wrote:
> How many users are you serving from your desktop?
A couple :-}
> There are many reasons why queries may run slowly or quickly, of course.
I suppose all you can really do is benchmark the various methods in your own
app...
--
Tom Chiverton
> > Unfortunately, even with consistent use of CFQUERYPARAM, many
> > of us will have longer query times than 3 milliseconds.
>
> Really ?!?
> This is on a very loaded desktop dev box, to a remote Oracle,
> that isn't on the best hardware either...
How many users are you serving from your deskt
On Tuesday 06 Apr 2004 17:09 pm, Dave Watts wrote:
> Unfortunately, even with consistent use of CFQUERYPARAM, many of us will
> have longer query times than 3 milliseconds.
Really ?!?
This is on a very loaded desktop dev box, to a remote Oracle, that isn't on
the best hardware either...
--
Tom
> I'll typical get consistant ~3ms query times using
> cfqueryparam, compaired to much longer without.
>
> Of course, caching into a persistant scope will get
> you a 0ms query time, but then you have to manage the
> cache (I really must write a generic memoiser CFC)
> yourself. And if you're
On Tuesday 06 Apr 2004 16:00 pm, Dave Watts wrote:
> When you use CFQUERYPARAM, the database will generally cache query
> execution plans, which can speed up future database queries using the same
> plan.
Hmm...
:tests
I'll typical get consistant ~3ms query times using cfqueryparam, compaired to
> > No, I'm pretty sure that once you run the query with
> > CACHEDWITHIN set to a timespan of zero, that'll remove
> > the previous cached query from the cache. Someone will
> > need to rerun the query against the database to recache
> > it, though.
>
> That was my point (however unclear it m
> makes it so your query is cached
> automatically?
No, it doesn't.
> I can see using cfqueryparam in the second instance, but I
> don't see how it helps in the first and I don't see how using
> it caches my queries or improves performance. I looked at
> the CFDOCS and don't see any info ab
>
>No, I'm pretty sure that once you run the query with CACHEDWITHIN set to a
>timespan of zero, that'll remove the previous cached query from the cache.
>Someone will need to rerun the query against the database to recache it,
>though.
>
That was my point (however unclear it may have been!), if I
> Is there any way to clear just individual queries? Would the
> best method for doing that be to execute the same query and
> give it a new cachedwithin value of #CreateTimeSpan(0,0,0,0)#
> to kill the cache from the backend and then when the frontend
> query is called again, it will reset th
nsight would be
appreciated.
John
-Original Message-
From: Thomas Chiverton [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 06, 2004 10:33 AM
To: CF-Talk
Subject: Re: Cached Queries
On Tuesday 06 Apr 2004 14:52 pm, Burns, John D wrote:
> the backend and adds a new article, then goes and v
> If you use cfqueryparam, you don't need to worry about
> caching your querys yourself. Oh, and it's more secure.
> Oh, and quicker.
While I just love the CFQUERYPARAM tag to death, it's not a substitute for
in-memory recordset caching. It doesn't cache recordsets in memory, and
therefore isn't
> While setting a createTimeSpan value of 0 will indeed work,
> the results won't take effect until the *next* page request,
> I think. In the above scenario, you'd be relying on somebody
> hitting that page again before showing the proper results
> (even if you just hit Refresh in your browser
On Tuesday 06 Apr 2004 14:52 pm, Burns, John D wrote:
> the backend and adds a new article, then goes and views the front end,
> he won't see the new update automatically, right? How could I (in my
If you use cfqueryparam, you don't need to worry about caching your querys
yourself.
Oh, and it's
="frontend"> for the front end and
for the back end) Is there any way to clear caches outside in a
different application than you're currently in?
John
-Original Message-
From: Dave Carabetta [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 06, 2004 10:19 AM
To: CF-Talk
S
John
I did exactly this on a site with news articles. You want to used
cached after with on the Articles query the date-time stored as an
application variable, e..g., Articles,CachedAfterDateTime,
When an admin updates an article reset the Articles,CachedAfterDateTime
variable to now() -- for
>Is there any way to clear just individual queries? Would the best
>method for doing that be to execute the same query and give it a new
>cachedwithin value of #CreateTimeSpan(0,0,0,0)# to kill the cache from
>the backend and then when the frontend query is called again, it will
>reset the cache?
>You can use
>
I'm not sure that's what he's after. If you use the above, you blow away the
entire cache, instead of just the query or queries that you want to refresh.
You could store the query results in the Application scope (or some shared
scope) and then refresh the key in the scope when
TED]
Sent: Tuesday, April 06, 2004 9:58 AM
To: CF-Talk
Subject: RE: Cached Queries
You can use
Qasim
-Original Message-
From: Burns, John D [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 06, 2004 9:53 AM
To: CF-Talk
Subject: Cached Queries
I have an app with a front end (the main site that
You can use
Qasim
-Original Message-
From: Burns, John D [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 06, 2004 9:53 AM
To: CF-Talk
Subject: Cached Queries
I have an app with a front end (the main site that users see) and a
backend (an admin app for updating articles, calendar event
> From: Scott Mulholland
>
> Is there any rule of thumb or method for figuring out how to
> optimize the number of queries to cache setting in Administrator?
There is no "hard and fast" setting for this
It really depends on the applications you have running on your server,
how many queries you
Thanks, Doug. That makes sense.
- Original Message -
From: <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, January 30, 2004 11:35 AM
Subject: RE: Cached Queries
> cached queries, via cachedwithin or cachedafter, are identified by their
signa
> Are cached-queries cfapplication-name specific?
No, they're not. They're identified by the SQL statement and the attributes
of the CFQUERY tag, excluding the CACHEDWITHIN/CACHEDAFTER attribute itself.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 79
cached queries, via cachedwithin or cachedafter, are identified by their signature which is composed of query name, SQL, etc..I forget the exact qualities. These are cached regardless of the presence of a cfapplication, else you would be required to use one when caching.
Doug
-Original Mes
Nothing wrong with a cfc having access to persistent data...I'd say an
app variable is the best way to do this. Just make the cfc test to see
if 24 hours have passed between refreshes. Application variables
aren't the only way to make data persist...you could use a db, or the
filesystem.
Some skel
d the time since it was first cached, but all this code is
in a .cfc and I want to keep it portable as possible.
Byron Mann
- Original Message -
From: "Matthew Walker" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, October 28, 200
cfquery.executionTime might be useful. In my experience it is 0 for
cached queries. However it might conceivably return 0 for non-cached
queries too.
Matthew Walker
http://www.matthewwalker.net.nz/
> -Original Message-
> From: Byron M [mailto:mbyron@;comcast.net]
> Sent: Tuesday, 29 Oc
Thomas Chiverton wrote:
> Let me get this right, if I set cachedWithin to 24 hours, and set 100 cached
> queries in the server, the server limit will 'win' if a 101st query is made,
> and the oldest query will be uncached ?
Correct.
Jochem
~~
Str
> so if you want to use a cached query in more than one place, CFINCLUDE
> it.
>
> That way, you know all instances of that query are going to be identical.
Yep...like all good Fuseboxers do. :)
Also makes it trivial to flush that cached query after doing an
add/delete/update that would im
Probably obvious, but...
> I do believe it's based on the entire *exact* contents of the
> cfquery tag.
> One simple change effectively makes it a different
> query...even just adding
> a space to it.
so if you want to use a cached query in more than one place, CFINCLUDE
it.
That way, you
Thanks
Duane
-Original Message-
From: Ken Wilson [mailto:[EMAIL PROTECTED]]
Sent: Sunday, March 11, 2001 1:26 PM
To: CF-Talk
Subject: RE: Cached Queries
I do believe it's based on the entire *exact* contents of the cfquery tag.
One simple change effectively makes it a different
I do believe it's based on the entire *exact* contents of the cfquery tag.
One simple change effectively makes it a different query...even just adding
a space to it.
Ken
> Quick question on cached queries:
>
> Are queries cached and retrieved from cache based on the query name or the
> SQL with
Quick question on cached queries:
Are queries cached and retrieved from cache based on the query name or the
SQL within the query?
Duane
-Original Message-
From: Cameron Childress [mailto:[EMAIL PROTECTED]]
Sent: Sunday, March 11, 2001 1:08 PM
To: CF-Talk
Subject: RE: Cached Queries
Great thanks!
Duane
-Original Message-
From: Cameron Childress [mailto:[EMAIL PROTECTED]]
Sent: Sunday, March 11, 2001 1:08 PM
To: CF-Talk
Subject: RE: Cached Queries
Take a peek in the CFAdmin and you will see that there is a setting for max
number of queries. I think the default
Take a peek in the CFAdmin and you will see that there is a setting for max
number of queries. I think the default setting is 100, but you can change
this setting if you'd like.
-Cameron
Cameron Childress
elliptIQ Inc.
p.770.460.7277.232
f.770.460.0963
> -Original Mess
> How do I define a cached query and then access it?
>
> Problem is that I have a menu built off a query, the pages
> built from those menu choices off other queries. Click too
> many menu items too quickly and poof! The CF service reboots.
> What would be the best way to handle this?
In CF
How do I define a cached query and then access it?
Problem is that I have a menu built off a query, the pages built from those
menu choices off other queries. Click too many menu items too quickly and
poof! The CF service reboots. What would be the best way to handle this?
Can I set a query t
s
elliptIQ Inc.
p.770.460.7277.232
f.770.460.0963
> -Original Message-
> From: Jennifer [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 02, 2001 3:36 PM
> To: CF-Talk
> Subject: RE: cached queries vs. structures was(Re: ...BETA...!! (query a
> query))
>
>
&g
and structures are both implemented as arrays in
>CF, so the performance difference should be negligible.
>
>Jason
>
>
>Jason Aden
>Allaire Certified Developer
>[EMAIL PROTECTED]
>www.wwstudios.com
>
> > -Original Message-
> > From: Cameron Childres
At 02:38 PM 2/2/01 -0500, you wrote:
> > I'd like to see some statistics on cached queries vs. querying a
> > structure.
>
>It would entirely depend on who you are planning on using your data. It's
>like comparing apples and oranges.
Yes, but if I could get some idea what the difference in perfo
[EMAIL PROTECTED]]
> Sent: Friday, February 02, 2001 2:38 PM
> To: CF-Talk
> Subject: RE: cached queries vs. structures was(Re: ...BETA...!! (query a
> query))
>
>
> > I'd like to see some statistics on cached queries vs. querying a
> > structure.
>
> It would e
> I'd like to see some statistics on cached queries vs. querying a
> structure.
It would entirely depend on who you are planning on using your data. It's
like comparing apples and oranges.
Incidentally, a query in CF can be treated like a structure already. You
can pull records out of a query
Also, you must take into account the fact that CF is not a DBMS, it has a
mini-database engine in it, but it does not have an query optimization
engine (like a SQL Server or an Oracle would have). So databases will
usually process queries quicker than CF will. The real benefits are in
eliminating
cutes
fairly quickly.
-Original Message-
From: Bud [mailto:[EMAIL PROTECTED]]
Sent: Sunday, November 12, 2000 8:32 AM
To: CF-Talk
Subject: Re: [Cached Queries]
On 11/12/00, W Luke penned:
>Excellent. I basically have 2 queries that both return large amounts of
>records - the first b
> I tried using it in my shopping cart also for countries and
> states/territories. It was dreadfully slow, because of the huge
> amount of javascript code that had to be loaded, and didn't work at
> times probably due to the same thing. I ended up just going to an
> extra screen to choose the st
On 11/12/00, W Luke penned:
>Excellent. I basically have 2 queries that both return large amounts of
>records - the first being as you describe above - however the second is an
>interesting dilema. I have a table called Locations, with "County" and
>"Town." Using the cool TwoSelectsRelated tag,
> They are cached by name, search parameters, and also by the query
> structure itself.
>
> So
>
> SELECT product_name
> FROM products
>
> and
>
> SELECT product_name FROM products
>
> would be read as 2 separate queries because the structure is
> different, even if they are named the same.
Oh
On 11/11/00, pan penned:
>As a final test to see if reformatted sql affects
>caching I repeated A & B with the difference that
>afetr a restart I excluded the reformatted sql call
>from the template but included it within B. Result
>is that Bud is absolutely right. My mistake was that
>I have a ma
> Interesting.
> B shows you were right, but also shows something
> else. The first cachedwithin call after the intial
> query did not produce cached results on a
> freshly restarted machine.
Good work boys. Just watching this discussion is making my brain itchy : )
From: "Bud" <[EMAIL PROTECTED]>
Subject: Re: [Cached Queries]
[results of sql formatting changes on caching]
Interesting.
Before I replied that it wasn't true I also had run
the same type of test. As you can see from the debug
output (A) below the differently typed sql
Content-Type: text/html; charset="us-ascii"
<!--
blockquote, dl, ul, ol, li { margin-top: 0 ; margin-bottom: 0 }
-->Re: [Cached Queries]
On 11/11/00, pan penned:
That's not true.
The two selects you wrote will not prevent cachedwithin usage.
There has to be a difference in sq
From: "Bud" <[EMAIL PROTECTED]>
Subject: Re: [Cached Queries]
> On 11/10/00, Alex penned:
> >i think they are cached according to the queryname. so if you name the query
> >with a sessionid you could have them cached per user.
> >and YES they will make t
On 11/10/00, Alex penned:
>i think they are cached according to the queryname. so if you name the query
>with a sessionid you could have them cached per user.
>and YES they will make the page faster for the end user.
>i cache all static querys.
They are cached by name, search parameters, and als
I have recently started to do this cache user-specific queries on a
global basis by using dynamic query names, based upon data specific to a
user. So far, it seems to be working well.
Kevin
>>> [EMAIL PROTECTED] 11/10/00 04:52PM >>>
Will:
Using the CachedWithin attribute caches the que
i think they are cached according to the queryname. so if you name the query
with a sessionid you could have them cached per user.
and YES they will make the page faster for the end user.
i cache all static querys.
"W Luke" <[EMAIL PROTECTED]> wrote:
Hi,
I'm quite interested in caching a couple
Will:
Using the CachedWithin attribute caches the query "globally" as you put it.
If you want to cache queries on a per user bases you might want to make the
query a session query. You can also accomplish "global" caching by placing
the query into the application scope.
Andrew Hewitt
We
> Does this mean that CF implicitly creates a copy of the
> cached query (query variable foo, above) for every template
> that references the query or will CF only do this if a
> template modifies the data within the query?
I don't have enough knowledge of the internals of the CF engine to say
> You can't really modify the contents of a cached query (again, assuming
that
> you're talking about using the caching attributes above). CF doesn't store
> those contents anywhere that you can programmatically access. To further
> illuminate this, let's say you run the following query:
>
> cach
> Is it advisable to use locking when referencing a cached
> query? I would assume a cached query fits the bill of being
> shared data. If so, then wouldn't the lock need to be around
> the statment as well as references to any query
> values?
If you're referring to queries cached with the
At 09:39 PM 10/6/00 -0600, you wrote:
>Is it advisable to use locking when referencing a cached query? I would
>assume a cached query fits the bill of being shared data. If so, then
>wouldn't the lock need to be around the statment as well as
>references to any query values?
You don't need to
Perhaps your syntax for setting this.attribute wasn't right? This should
work.
SELECT *
FROMEQUIP.ATTRIBUTE_OPTION
WHERE ATTR_NAME = '#this.attribute#'
Order by ATTR_VALUE
--
Something kinda useful:
I think that everybody has forgotten about the 'million' recent postings asking to
figure out when a session has timed out. An onsessionend script added to the feature
list?
(plus of course all the cool things that have been posted to this thread already...)
Jared.
> > Is there any way to tell how much memory is being used by a
> > cached query?
Recently I have been thinking about how useful this data would be. I'd love
to see a suite of functions in CF which would allow us to determine how much
memory is being used by different parts of CF at any given ti
> Is there any way to tell how much memory is being used by a
> cached query?
Not really. CF doesn't expose that information.
You might be able to get a rough idea by caching the query within an
isolated test, then checking the memory consumption difference.
Dave Watts, CTO, Fig Leaf Software
80 matches
Mail list logo