473,385 Members | 1,506 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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.
Sep 2 '08 #1
2 3533
On Sep 2, 5:35*pm, PaulR <paul_red...@uk.ibm.comwrote:
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).

Sep 2 '08 #2
Ian
PaulR wrote:
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.

- 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.
Sep 4 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Thomas Philips | last post by:
To experiment with filtering, I define a function f(x,k) as follows >>> def f(x,k=2): return x%k==0 I can check that it works by typing >>> f(10,3) False Now, I try to filter a range using...
3
by: Nile | last post by:
I am having a problem with my application that uses ODBC. I am doing the following: * prepare a statement * Bind * execute The problem is that my application needs to accept only insert...
5
by: bughunter | last post by:
For example - very large table with a lot indexes and updates work very slow. I'd like found unused or rarely used indexes. How? Yes, for static I found all sql in packages and, after analyse,...
3
by: Venkata C | last post by:
Hi! We are running DB2 V8 on z/OS in compatibility mode. There is one specific query (embedded as static SQL in a COBOL program) that causes the bind job to abend when we use the DEGREE(ANY)...
3
by: Richard | last post by:
Hi, I have a form based on a table. When I filter the form I want to run a report based on the same table with the same filter as the form. No problem until I want to filter a combo box where...
5
by: Amaryllis | last post by:
I'm trying to call a CL which is located on our AS400 from a Windows application. I've tried to code it in different ways, but I seem to get the same error every time. Does anyone have any clue...
23
by: Dave G | last post by:
Since upgrading one of my clients from A97/W2000 to A2003/XP they have suffered no end of data corruption problems, mainly involving one of the main tables. The corruption can result in one...
3
by: rcarwise | last post by:
Iam having trouble getting started on this program and wanted to know if I could get help on writing a method and loops to get started. this is the program that I have to do: Write a...
7
by: =?ISO-8859-2?Q?Gregor_Kova=E8?= | last post by:
Hi! Is it possible to use parameter markers like this: 1.) SELECT * FROM TABLE1 WHERE FIELD1 LIKE '%?%' If I now set parameter 1 to '' (empty string) I don't get any rows back, but if I run:...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.