Fwd: Histogram worthwhile?

From: gengmao <gengmao_at_gmail.com>
Date: Fri, 27 Feb 2009 11:55:35 +0800
Message-ID: <afe23fd50902261955i440a466aqc5cb452cbdfb251a_at_mail.gmail.com>

  • Forwarded message ---------- From: gengmao <gengmao_at_gmail.com> Date: Fri, Feb 27, 2009 at 11:55 AM Subject: Re: Histogram worthwhile? To: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>


Thanks for pointing it out. I find a blog post explained Adaptive Cursor Sharing in great details,
http://optimizermagic.blogspot.com/2007/12/why-are-there-more-cursors-in-11g-for.html. Karen Morton's white paper also explain it well. As Karen said in the paper, "The whole bind peeking problem seems to be solved with Oracle version 11." It is awesome. And it will be greater if Oracle explains how histogram buckets and statistics affect bind_sensitive and bind_aware.


They did not make big changes for cursor parsing, instead chose a steady change strategy

On Thu, Feb 26, 2009 at 4:10 AM, Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk
> wrote:

> That describes part of what Oracle has done in 11g with adaptive cursor
> sharing.
> 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.html
> ----- Original Message ----- From: "gengmao" <gengmao_at_gmail.com>
> To: <greg_at_structureddata.org>
> Cc: <kerry.osborne_at_enkitec.com>; <oracle-l_at_freelists.org>
> Sent: Wednesday, February 25, 2009 9:45 AM
> Subject: Re: Histogram worthwhile?
> Why bind peeking can only choose one plan? I think oracle could store
>> multiple plans for a SQL (one sql_id could have multiple hash_value,
>> right?), just based on histogram size. When executing query, oracle could
>> peek the bind value, check what histogram bucket the value drops in, then
>> generate or reuse a execution plan for that histogram bucket.
>> I think such an approach has following pros. 1) plans could be reused 2)
>> its
>> parsing cost is still less than hard parse (no bind variable) 3) plans are
>> optimal for each histogram bucket. 4) Histogram buckets size determines
>> the
>> amount of plans. We can adjust buckets size to balance the cost of large
>> amount stored plans and the optimal degree for a SQL. Easy for tuning.
>> Maybe it's a naive thought. While hope you could explain.
>> Thanks,
>> Eric Geng

Received on Thu Feb 26 2009 - 21:55:35 CST

Original text of this message