473,830 Members | 1,923 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Predicate evaluation across federation

I have a query that has 5 predicates, scanning a table of 400+ million
rows and I have built indexes getting help from design advisor and
other tools. The cost of that query is really low. But I federated the
server and created a nickname for that table, and when I give the same
query against the nickname, it tries to fetch the whole table (cost
1.7 billion), and do the predicate evaluation in my smaller test box.
I did build indices in my test box with 'specification only' clause,
and runstats, and other things. I also read about query pushdown, and
hoping that would help, I changed the cpu_ratio parameter in fed
server's config. Still no joy. Please help.. any links would be
appreciated.
Also, how does one quantify cost of a query..
Dec 5 '07 #1
3 1932
Arun Srinivasan wrote:
I have a query that has 5 predicates, scanning a table of 400+ million
rows and I have built indexes getting help from design advisor and
other tools. The cost of that query is really low. But I federated the
server and created a nickname for that table, and when I give the same
query against the nickname, it tries to fetch the whole table (cost
1.7 billion), and do the predicate evaluation in my smaller test box.
I did build indices in my test box with 'specification only' clause,
and runstats, and other things. I also read about query pushdown, and
hoping that would help, I changed the cpu_ratio parameter in fed
server's config. Still no joy. Please help.. any links would be
appreciated.
Also, how does one quantify cost of a query..
Maybe you could give us some more details. How did you do the runstats on
the fed server? What's your table/nickname, indexes (on both ends), the
query and the access plan for it? How did you determine that all rows are
to be fetched from the data source to the fed server?

Which version of DB2 are you using on which platform? Is your fed server
and remote data source both a DB2 system?

--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Dec 7 '07 #2
Maybe you could give us some more details. How did you do the runstats on
the fed server? What's your table/nickname, indexes (on both ends), the
query and the access plan for it? How did you determine that all rows are
to be fetched from the data source to the fed server?

Which version of DB2 are you using on which platform? Is your fed server
and remote data source both a DB2 system?

--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Hi
Both servers are runnning db2, but the federator is on 8.2 while the
remote source is in 9.4. I ran a sql from my test db(not the source)
and did a db2explain, it showed me that the predicate evaluation was
done in remote server. But the way our developers were doing was to
construct this sql on the fly, open a cursor inside a stored
procedure , like for example, their input data matches some rules,
they give one particular sql for constructing a cursor with. If it
uses the remote data source (only that with some predicates) , the
target tries to get entire table and do the predicate evaluation.
I have constructed indexes on this nickname (definition only) , that
didnt help me either. I am running out of options.
The way I find that predicate evaluation is done in target is the
cost of query that runs in my source (145MIL -aah..) and the sql from
the snapshot. The sql doesnt have any predicates, and this escalates
to a table level lock as soon as it starts.
Any help would be appreciated.
Thank you
Arun
Dec 10 '07 #3
Arun Srinivasan wrote:
Both servers are runnning db2, but the federator is on 8.2 while the
remote source is in 9.4. I ran a sql from my test db(not the source)
and did a db2explain, it showed me that the predicate evaluation was
done in remote server. But the way our developers were doing was to
construct this sql on the fly, open a cursor inside a stored
procedure , like for example, their input data matches some rules,
they give one particular sql for constructing a cursor with. If it
uses the remote data source (only that with some predicates) , the
target tries to get entire table and do the predicate evaluation.
I have constructed indexes on this nickname (definition only) , that
didnt help me either. I am running out of options.
The way I find that predicate evaluation is done in target is the
cost of query that runs in my source (145MIL -aah..) and the sql from
the snapshot. The sql doesnt have any predicates, and this escalates
to a table level lock as soon as it starts.
I guess I'm a bit dense here because I didn't understand the details. Could
you post:
(1) The access plans you got from your separate test and and from the code
in the stored procedure?
(2) The stored procedure code (stripped down to the bare minimum that
exhibits the problem.
(3) A CLI trace from the remote data source where you can see which SQL
statements are being processed. (That's an easy way to verify what the
federated server really sends to the data source.)
In short, while I understand your description, we are simply missing the
details to say anything about it.

p.s: I'm assuming your remote data source is running DB2 V9.5 (and not 9.4)?

--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Dec 11 '07 #4

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

Similar topics

2
1618
by: RavenCross | last post by:
we are in need of a game developer rather quickly. Candidates will be responsible in assisting in all coding from marketing, developing new games, maintaining and updating existing games in the Space Federation. Interested candidates can apply and start work anytime with us.we mostly need still mech pictures. Space Federation is an endeavor to bring free internet games to the public. With over 290,708 registered players playing daily, we...
14
4342
by: spencer | last post by:
My client is going through a large project to replace existing data warehouse physical infastructure which is running DB2 8.1.6. In the past we had a much more distributed environment where we had certain portions of the data warehouse on a physically different server. We utilized federation to allow the joining of tables on seperate instances. We found that this worked ok in situations where the tables were not that large say under...
3
1856
by: BobTheDatabaseBoy | last post by:
can't find in the RedBook, or scouring this NG, a simple yes/no answer to the question: given mountains of existing COBOL programs which have read/written to multiple schemas, but in one z/OS(v7) instance, whether Information Integrator exists for that platform, and would allow reading/writing to schemas in multiple instances. the doc reads (to me) like II sends all data through an LUW instance.
8
3351
by: der | last post by:
Hello all, I've a question about order of evaluations in expressions that have && and || operators in them. The question is: will the evalution go left-to-right, no matter what -- even if the || operator is before the && operator? e,g, In an expression like a = (z>x) || (x<0) && (z-y>9); is it guaranteed that z>x will be checked first?
4
2580
by: Frank Wallingford | last post by:
Note: For those with instant reactions, this is NOT the common "why is i = i++ not defined?" question. Please read on. I came across an interesting question when talking with my colleagues. According to the standard, most operators evaluate their operands in an unspecified order. This means that in code like this: f() + g()
3
3240
by: Baski | last post by:
Hi, I have few questions, 1) I have DB2 8.2 ESE, with a db2 instance and a few databases. Is it posiible to create and configure a federated server. what are the things/steps required to do so. For federation server should I have additional tool called Information Integrator or can I do without it? Does the Wrapper to connect to
1
1839
by: SteZgr | last post by:
I have implemented in .NET 2.0 a custom XPathNavigator for Xpath filtering on an object tree. So far it works. While analyzing the performance, I have noticed a lot of MoveToNextAttribute calls. A closer look has shown that there seems to be a none optimal evaluation of attribute predicates such as . It works as expected if there is a match of the attribute value, i.e. the XPathNavigator calls MoveToNextAttribute until it gets the ID...
5
1959
by: BobTheDataBaseBoy | last post by:
A client has 390/V7 and UDB/V8. It would be useful to use row_number() when selecting from 390, but that's not supported. It occurs to me (I'm not in CubeLand, and anyway we upgraded to V8 on z/OS) that federation (on UDB/V8) might support functions on those 390/V7 tables. Is this known? thanks
0
2048
by: vbace2 | last post by:
Using DB2 v9.1 fixpak 2 (WSE with HADR feature) on Windows 2003 Servers We are trying to set up HADR for two production databases. The two primary databases reside on two different servers. We would like to put the two standby databases on the same server. One of the databases (we will call it NICKNM) has tables federated from the other database (we will call it OTHER). I was able to set up HADR for these two databases so that the...
0
9641
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10769
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10196
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9310
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6940
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5615
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5775
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4408
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3070
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.