Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old September 2nd, 2008, 09:45 AM
PaulR
Guest
 
Posts: n/a
Default Filter Factors when using Parameter markers?

Hi,
(DB2 LUW v8.2)

When using parameter markers how does the optimizer evaluate filter
factors?
- and is it able to make use of distribution stats. for parm.
markers?


The reason I ask, is we have heavily skewed data in places and we need
to understand the limitations/estimations the optimizer will use if
and when parameter markers are used.

Many thanks.

PaulR.
  #2  
Old September 2nd, 2008, 03:15 PM
Tonkuma
Guest
 
Posts: n/a
Default Re: Filter Factors when using Parameter markers?

On Sep 2, 5:35*pm, PaulR <paul_red...@uk.ibm.comwrote:
Quote:
Hi,
(DB2 LUW v8.2)
>
When using parameter markers how does the optimizer evaluate filter
factors?
* *- and is it able to make use of distribution stats. for parm.
markers?
>
The reason I ask, is we have heavily skewed data in places and we need
to understand the limitations/estimations *the optimizer will use if
and when parameter markers are used.
>
Many thanks.
>
PaulR.
I don't know how optimizer evaluates filter factors for parameter
markers.
But, you can specify SELECTIVITY clause by specifying environment
variable "DB2_SELECTIVITY = Yes"(on DB2 V8 or V9.1. I couldn't find
DB2 environment variables for DB2 V9.5 for LUW).

  #3  
Old September 5th, 2008, 12:15 AM
Ian
Guest
 
Posts: n/a
Default Re: Filter Factors when using Parameter markers?

PaulR wrote:
Quote:
Hi,
(DB2 LUW v8.2)
>
When using parameter markers how does the optimizer evaluate filter
factors?
DB2 is able to determine a filter factor based on the cardinality the
column. i.e., filter factor = 1/colcard.

For example,

select * from t1 where c1 = ?

If c1 has 5 unique values, the filter factor = 0.2. But if c1 has
100 unique values, filter factor = 0.01.

Quote:
- and is it able to make use of distribution stats. for parm.
markers?
>
The reason I ask, is we have heavily skewed data in places and we need
to understand the limitations/estimations the optimizer will use if
and when parameter markers are used.
Column distribution is not used with parameter markers.

In DB2 9, the REOPT functionality can allow dynamic SQL with parameter
markers (and static SQL) to take advantage of distribution stats.


 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles