Paul

It is my understanding (and it was born out by experimentation) that 
CF Query caching will cache the same-named query 26 different times, 
because the query itself, is different.  (I don't have admin 
permissions, so I can't actually determine if the cache contains what 
I think is does).

The application I mentioned is exactly as you described, a yellow 
pages of products and/or suppliers, keyed by first letter of name: A, 
B, C...

I use cachedafter of a variable (one for each major table) set in the 
application scope.  When a table is, updated, say the Suppliers 
table, its Application.SuppliersUdatedAt variable is reset to the 
current date/time.

I cache all the queries in the drill-down, but do not cache the query 
that retrieves the final record.  The drill down is:

    Products First Letter Groups (cached)

       Products within a group (cached)

          First 10 supplier candidates for the product (cached)

          Next 10 supplier candidates for the product...  (cached)

             Selected Supplier (not cached)

The drill down query rows consist of:

   Product Groups Query

      Product Table

         GroupFirstLetter Char (derived with SQL Server Functions)
         GroupLasttLetter Char (derived with SQL Server Functions)

    Products Query

      Product Table

         ProductID (PK)
         NAME      VarChar(50)

    Supplier Candidates Query

      Supplier Table

        PresentationOrder Int (derived with SQL Server Functions)
        SupplierID        PK
        Name              Var
        Phone             VarChar(15)
        Fax               VarChar(15)
        City              VarChar(30)
        State             Char(2)
        Country           Charr(3)

     ProductsAndSuppliers Associative Table

        ProductID         FK---+
                               +-----PK
        SupplierID        FK---+


Anyway, the queries are compact, and tend to have:

    Product Groups Query.......... < 26 rows
    Products Query................ 150 rows
    Supplier Candidates Query..... 20-30 Candidates


Their appears to be a limit that only 100 queries can be cached this 
way (according to what I have heard/read).

But, even so, this would have the effect of purging the LRU query, 
which is what I would desire... it tunes itself, based un usage 
patterns.

The effect is (or appears to be), that the most popular queries are 
retrieved from the cache.

HTH

Dick




At 6:02 AM -0700 7/28/00, paul smith wrote:
>So how does CF Query caching work in a Yellow Pages application?
>
>Consider the drill-down "List Headings by Alphabet".
>
>Only the WHERE changes in the Query, for example,
>WHERE Heading_Name LIKE 'A%'
>WHERE Heading_Name LIKE 'B%'
>etc.
>
>Will CF cache all 26 Queries if they all have the same name?
>
>Or would I have to name each queries different to get CF to cache all 26?
>
>best,  paul
>
------------------------------------------------------------------------------
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to