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: Non-caching of SQL queries

Re: Non-caching of SQL queries

From: DA Morgan <damorgan_at_psoug.org>
Date: Fri, 30 Nov 2007 19:35:15 -0800
Message-ID: <1196480107.676848@bubbleator.drizzle.com>


Peter Teoh wrote:
> On Dec 1, 1:42 am, DA Morgan <damor..._at_psoug.org> wrote:

>> And how would caching them do anything other than waste memory?

>
> Thanks for the reply.
>
> Erh....not sure why u ask that question. If my batch script is
> running into millions of SQL, wouldn't it be faster if more cache is
> available for transaction, as the caching of this SQL is competing for
> the actual processing of the SQL. As far as I am aware of, the
> SQLAREA's cache is to facilitate minimize parsing of the SQL. But if
> the SQL is executed only once, and almost every subsequent SQL need to
> be reparsed again, then I supposed it is not necessary to hog the
> memory with these SQL. The only way I can flush the SQL from SQLAREA
> currently, is to issue DDL statements against the underlying
> structures (be it a view, or table etc) and immediately all the
> previous SQL in SQLAREA is intelligently removed. This is because
> the next SQL will need to be parsed again anyway.
>
> Thank you.

You are not running millions of DDL statements ... your are running millions of DML statements. DML is cached and what you were asking was hot to cache the DDL. I'm asking why would you want to cache something, such as a CREATE TABLE, that will never be executed again during the session.

-- 
Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington
damorgan_at_x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Fri Nov 30 2007 - 21:35:15 CST

Original text of this message

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