Unix Technical Forum

query_rewrite_enabled parameter

This is a discussion on query_rewrite_enabled parameter within the Oracle Database forums, part of the Database Server Software category; --> I am not using function based indexes or materialized views. If I set this parameter=FALSE, will cost optimzer do ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-26-2008, 06:20 AM
zigzagdna@yahoo.com
 
Posts: n/a
Default query_rewrite_enabled parameter

I am not using function based indexes or materialized views. If I set
this parameter=FALSE, will cost optimzer do something?. What are the
advantages of setting this parameter Query_rewtite_enabled=TRUE.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-26-2008, 06:20 AM
fitzjarrell@cox.net
 
Posts: n/a
Default Re: query_rewrite_enabled parameter

On Jun 14, 1:10 pm, zigzag...@yahoo.com wrote:
> I am not using function based indexes or materialized views. If I set
> this parameter=FALSE, will cost optimzer do something?. What are the
> advantages of setting this parameter Query_rewtite_enabled=TRUE.


Give us the release of Oracle you're using and we can tell you. I can
tell you that from 8.1.6 onwards query_rewrite_enabled is no longer
necessary when using function-based indexes. From 8.1.6 through
9.2.0.8 setting that parameter to TRUE changes the rules for
transitive closure (this is fixed in 10g) causing the estimated
cardinality for affected queries, and thus the execution plans, to be
incorrect.

Post the release of Oracle you're using, to four numbers (8i, 9i, 10g
are not proper responses). You'll get an accurate answer after you do
so.


David Fitzjarrell

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-26-2008, 06:20 AM
zigzagdna@yahoo.com
 
Posts: n/a
Default Re: query_rewrite_enabled parameter

On Jun 14, 2:30 pm, "fitzjarr...@cox.net" <fitzjarr...@cox.net> wrote:
> On Jun 14, 1:10 pm, zigzag...@yahoo.com wrote:
>
> > I am not using function based indexes or materialized views. If I set
> > this parameter=FALSE, will cost optimzer do something?. What are the
> > advantages of setting this parameter Query_rewtite_enabled=TRUE.

>
> Give us the release of Oracle you're using and we can tell you. I can
> tell you that from 8.1.6 onwards query_rewrite_enabled is no longer
> necessary when using function-based indexes. From 8.1.6 through
> 9.2.0.8 setting that parameter to TRUE changes the rules for
> transitive closure (this is fixed in 10g) causing the estimated
> cardinality for affected queries, and thus the execution plans, to be
> incorrect.
>
> Post the release of Oracle you're using, to four numbers (8i, 9i, 10g
> are not proper responses). You'll get an accurate answer after you do
> so.
>
> David Fitzjarrell


Sorry, I am using Oracle 9.2.0.6 on Windows 2003.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-26-2008, 06:20 AM
The Boss
 
Posts: n/a
Default Re: query_rewrite_enabled parameter

zigzagdna@yahoo.com wrote:
> On Jun 14, 2:30 pm, "fitzjarr...@cox.net" <fitzjarr...@cox.net> wrote:
>> On Jun 14, 1:10 pm, zigzag...@yahoo.com wrote:
>>
>>> I am not using function based indexes or materialized views. If I
>>> set this parameter=FALSE, will cost optimzer do something?. What
>>> are the advantages of setting this parameter
>>> Query_rewtite_enabled=TRUE.

>>
>> Give us the release of Oracle you're using and we can tell you. I
>> can tell you that from 8.1.6 onwards query_rewrite_enabled is no
>> longer necessary when using function-based indexes. From 8.1.6
>> through
>> 9.2.0.8 setting that parameter to TRUE changes the rules for
>> transitive closure (this is fixed in 10g) causing the estimated
>> cardinality for affected queries, and thus the execution plans, to be
>> incorrect.
>>
>> Post the release of Oracle you're using, to four numbers (8i, 9i, 10g
>> are not proper responses). You'll get an accurate answer after you
>> do so.
>>
>> David Fitzjarrell

>
> Sorry, I am using Oracle 9.2.0.6 on Windows 2003.


Here's a good blog on the transitive closure issue mentioned by David:
http://jaffardba.blogspot.com/2006/0...iour-when.html

--
Jeroen


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-26-2008, 06:20 AM
fitzjarrell@cox.net
 
Posts: n/a
Default Re: query_rewrite_enabled parameter

On Jun 14, 2:18 pm, zigzag...@yahoo.com wrote:
> On Jun 14, 2:30 pm, "fitzjarr...@cox.net" <fitzjarr...@cox.net> wrote:
>
>
>
>
>
> > On Jun 14, 1:10 pm, zigzag...@yahoo.com wrote:

>
> > > I am not using function based indexes or materialized views. If I set
> > > this parameter=FALSE, will cost optimzer do something?. What are the
> > > advantages of setting this parameter Query_rewtite_enabled=TRUE.

>
> > Give us the release of Oracle you're using and we can tell you. I can
> > tell you that from 8.1.6 onwards query_rewrite_enabled is no longer
> > necessary when using function-based indexes. From 8.1.6 through
> > 9.2.0.8 setting that parameter to TRUE changes the rules for
> > transitive closure (this is fixed in 10g) causing the estimated
> > cardinality for affected queries, and thus the execution plans, to be
> > incorrect.

>
> > Post the release of Oracle you're using, to four numbers (8i, 9i, 10g
> > are not proper responses). You'll get an accurate answer after you do
> > so.

>
> > David Fitzjarrell

>
> Sorry, I am using Oracle 9.2.0.6 on Windows 2003.- Hide quoted text -
>
> - Show quoted text -


Then the transitive closure issue affects you should you decide to set
query_rewrite_enabled to TRUE. Jonathan Lewis wrote about this in
"Cost-Based Oracle Fundamentals", pp. 141-144.


David Fitzjarrell

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-26-2008, 06:20 AM
DA Morgan
 
Posts: n/a
Default Re: query_rewrite_enabled parameter

zigzagdna@yahoo.com wrote:
> I am not using function based indexes or materialized views. If I set
> this parameter=FALSE, will cost optimzer do something?. What are the
> advantages of setting this parameter Query_rewtite_enabled=TRUE.


It will definitely do something. Whether that is something you want
is quite another question.

The solution is to set up a testing environment and use it.

What you have not indicted is why you think this is a good idea.
What is happening to lead you to that conclusion. Explain Plan
examples would be helpful.
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-26-2008, 06:20 AM
zigzagdna@yahoo.com
 
Posts: n/a
Default Re: query_rewrite_enabled parameter

On Jun 14, 4:20 pm, DA Morgan <damor...@psoug.org> wrote:
> zigzag...@yahoo.com wrote:
> > I am not using function based indexes or materialized views. If I set
> > this parameter=FALSE, will cost optimzer do something?. What are the
> > advantages of setting this parameter Query_rewtite_enabled=TRUE.

>
> It will definitely do something. Whether that is something you want
> is quite another question.
>
> The solution is to set up a testing environment and use it.
>
> What you have not indicted is why you think this is a good idea.
> What is happening to lead you to that conclusion. Explain Plan
> examples would be helpful.
> --
> Daniel A. Morgan
> University of Washington
> damor...@x.washington.edu (replace x with u to respond)
> Puget Sound Oracle Users Groupwww.psoug.org


Oarcel provides a hinted called UNNESTED which will "rerewite" query
to merge sub query to driving query. Does this hint reqyure this
paremetr to be TRUE.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-26-2008, 06:20 AM
DA Morgan
 
Posts: n/a
Default Re: query_rewrite_enabled parameter

zigzagdna@yahoo.com wrote:
> On Jun 14, 4:20 pm, DA Morgan <damor...@psoug.org> wrote:
>> zigzag...@yahoo.com wrote:
>>> I am not using function based indexes or materialized views. If I set
>>> this parameter=FALSE, will cost optimzer do something?. What are the
>>> advantages of setting this parameter Query_rewtite_enabled=TRUE.

>> It will definitely do something. Whether that is something you want
>> is quite another question.
>>
>> The solution is to set up a testing environment and use it.
>>
>> What you have not indicted is why you think this is a good idea.
>> What is happening to lead you to that conclusion. Explain Plan
>> examples would be helpful.
>> --
>> Daniel A. Morgan
>> University of Washington
>> damor...@x.washington.edu (replace x with u to respond)
>> Puget Sound Oracle Users Groupwww.psoug.org

>
> Oarcel provides a hinted called UNNESTED which will "rerewite" query
> to merge sub query to driving query. Does this hint reqyure this
> paremetr to be TRUE.


In what version? Test it!
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:41 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com