Quote:
|
Originally Posted by dareman123
i just wonder why db2 wont try to do much of work on the data source and then ship the results to federated server.
|
DB2 has a cost-based optimizer. Thus, it costs the different variations to execute the statement - with and without push-down of various query blocks - and then picks the plan that has the lowest costs. In order to get a good plan, it is necessary to have accurate statistics in the federated server about local data and also remote data. Those are the basics...
Another issue with federated is simply: DB2 can't push down a part of the query if the remote data source simply does not support the respective operation or if DB2 does not know how the remote data source supports it. If DB2 cannot push-down something for whatever reason, it will compensate at the federated server. Of course, this compensation can result in slower query response time compared to a complete execution at the remote data source. As a (not really good) example), let's assume that the data source cannot do a GROUP BY. So the federated server has to retrieve
all qualifying rows from the data source, and perform the grouping and aggregation locally. If each group contains about 1 million rows, the federated server has to retrieve 1 million times more data from the remote data source than would have been necessary if the GROUP BY operation could have been pushed down.
Quote:
|
what factors really matter for db2 to execute most of the query in data source(for example when only one table is present in the federated server and the remaining all tables present in source).if you have any document or link that explains about push down analysis in general could you please post that in this forum..
|
Besides the DB2 manual, I am not aware of such a document. If something is missing in the manuals, please use the Feedback bottom in the Information Center to get any issues fixed in the manual - separate books are usually not a good idea for such stuff.