Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Caching for "LIKE" queries?
Vince wrote:
> On Mar 20, 1:10 pm, DA Morgan <damor..._at_psoug.org> wrote:
>> 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 >> damor..._at_x.washington.edu >> (replace x with u to respond) >> Puget Sound Oracle Users Groupwww.psoug.org- Hide quoted text - >> >> - Show quoted text -
SQL> CREATE TABLE t (
2 testcol VARCHAR(30));
Table created.
SQL> desc t
Name Null? Type ----------------------------------------- -------- ------------ TESTCOL VARCHAR2(30)
SQL> Compare what is created with with the DDL.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Tue Mar 20 2007 - 23:27:26 CDT
![]() |
![]() |