Re: PGA_AGGREGATE_TARGET sizing of work areas and HJ cost
Date: Fri, 29 May 2009 18:45:16 +0100
"joel garry" <joel-garry_at_home.com> wrote in message
On May 29, 9:14 am, Grzegorz <fgrzegor..._at_finteria.pl> wrote:
> I'm doing some investigations
> because of query plan changing in the same session (from NL Index RS to
> HJ FTS), and got question about Hash_Join_Area_Size when
> Is that possible that the same session can have different
> HJAS for same query ?
> When auto pga allocation is in place its quite possible in my opinion.
> Looks like depending on instance workload (in PGA terms) some queries
> may switch between NL Index RS and HJ FTS in the same session.
> I'm on 126.96.36.199 .
I was under the impression that CBO used hash_area_size only when
Are you certain you are asking about the right parameter? http://otn.oracle.com/pls/db92/db92.initora?remark=homepage#index-HAS
I'm thinking anything that can reparse the query could cause a change in plan, and there are many things that will cause invalidations leading to that. Also, if you are using parallel or shared servers other strange things can happen. The way to know for sure is to trace your session and look. Instant classic paper: http://www.tanelpoder.com/files/Advanced_Oracle_Troubleshooting.pdf Other interesting observations about PGA from this old chestnut: http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:47466211228419 Earlier versions of 9.2 had many bizarre issues with auto PGA, it's possible that 188.8.131.52 has idiosyncracies. Have you set session_cached_cursors, cursor_sharing, or do you see anything in the alert log or other evidence that too much is happening in your shared sql area?
In 11g you can flush a single query:
Assuming of course it isn't the obvious bind variable issue as John mentioned, in which case it really wouldn't be the "same query."
From the way the OP asks the question I don't think he had the parameter hash_area_size in mind; to me it sounded like a question about "how is the equivalent of the hash_area_size derived when using automatic workarea sizing".
-- Regards Jonathan Lewis http://jonathanlewis.wordpress.com Author: Cost Based Oracle: Fundamentals http://www.jlcomp.demon.co.uk/cbo_book/ind_book.html The Co-operative Oracle Users' FAQ http://www.jlcomp.demon.co.uk/faq/ind_faq.htmlReceived on Fri May 29 2009 - 12:45:16 CDT