Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Caching for "LIKE" queries?

Re: Caching for "LIKE" queries?

From: DA Morgan <damorgan_at_psoug.org>
Date: Tue, 20 Mar 2007 13:10:24 -0700
Message-ID: <1174421423.724431@bubbleator.drizzle.com>


fraserofthenight wrote:
> Hi,
>
> I was wondering what sort of caching is done for repeated queries, and
> how long results stay in the cache. For example, suppose I had a table
> named "files" in which there was a (varchar, nonclustered-indexed)
> field called "name", taht is queried with a query similar to "SELECT *
> FROM files WHERE name LIKE (?)". If one user queried "harry" and the
> next user queried "harry potter", would any caching have been done, as
> teh results of the second query would most likely be a subset of the
> results of the first. What if the files table had been changed in
> between?
>
> Specifically, I'm wondering if I should implement a cache at the
> application level (or in the database, since all the queries are
> called using stored procs -- is this a good idea at all?), or whether
> the database will take care of that for me.
>
> Thanks,
> Fraser

Based on what you've written my assumption would be that you are brand new to Oracle.

No data type named VARCHAR
No such thing as a nonclustered-index
a field called "name" would be misusing a keyword etc.

Result sets are not cached ... blocks may be.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Tue Mar 20 2007 - 15:10:24 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US