Home » SQL & PL/SQL » SQL & PL/SQL » Oracle Context Poilcy Question
icon5.gif  Oracle Context Poilcy Question [message #190439] Wed, 30 August 2006 14:20 Go to next message
jilpangs
Messages: 16
Registered: April 2005
Junior Member
Hi,

In the following query , RET_PM_PROD , RET_RLNSHP , RET_CLNT tables are defined in context policy table and enabled.

SELECT count(*)
FROM RET_PROD rp, RET_PM_PROD rpp, RET_RLNSHP rr, RET_CLNT clnt, RET_BAL rb
Where rb.s_num >= 20 and rb.s_num < 40
and rb.clnt_hrcy = clnt.clnt_hrcy
and clnt.c_key = rr.c_key
and rr.a_key = rpp.a_key
and rb.t_key = 0
and rp.p_key = rpp.p_key
and not (a_naic='02' and (a_lid='TUH' or a_lid='WSD'))


If i run the query by changing FIRST line of where clause to
Where rb.s_num = 21 , it takes only 2-3 mins to run. But when i put back the where clause
as " Where rb.s_num >= 20 and rb.s_num < 40 "
query hangs.

If i disable context policy...my query runs normally even with where clause (Where rb.s_num >= 20 and rb.s_num < 40 ).

Note: i'm quering the following table to see the context policy
select * from all_policies

Question 1: What is this Context policy for or how is it affecting my query ?

Question 2: I dont think i need to modify the query as it is working properly when context policy is disabled. OR am i wrong and query needs to re-written ??
Re: Oracle Context Poilcy Question [message #190632 is a reply to message #190439] Thu, 31 August 2006 08:37 Go to previous message
pareshr
Messages: 18
Registered: August 2006
Location: Ahmedabad
Junior Member

Hi,

Can you go thru this link to get idea abt context policy.

http://www.oracle.com/technology/pub/articles/10gdba/week14_10gdba.html

if you need further clarification then let me know, then i ll explain you...

k
Previous Topic: CODES RULE
Next Topic: Semantic error
Goto Forum:
  


Current Time: Fri Dec 09 13:59:11 CST 2016

Total time taken to generate the page: 0.08851 seconds