[thesite] query results caching

Joshua OIson joshua at alphashop.net
Mon Mar 5 12:05:09 CST 2001


Additionally,

For Cold Fusion to use cached queries, the SQL statement, db, and everything
must be exactly identical.  IOW, CF Server would have to pattern match the
entire query against cached queries on record.  That does, while however
minimal, take time.  When compiling a template to P-Code, the pattern match
would still have to take place against the database of cached queries.
However, if you explicitly store the query, you may lose some time in
storing the query, but in P-Code the recall of the query runs in a flat
time, not dependent on the number of queries cached and the length of the
SQL query string.

Additionally, if you hand craft a query by using <cfset myquery=QueryNew()>
and hand stuffing the rows, then you can use the same mechanisms you use to
store the query.  So, now you have one repository for saved queries instead
of two.

-joshua





More information about the thesite mailing list