Focal Point
Adapter Optimization

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/8501056942

October 01, 2007, 05:45 PM
<Socrates>
Adapter Optimization
Hi,
I'm trying to figure out how I can force webfocus to do the JIONS for a report on the RDBMS server and just pass the resulting dataset back to webfocus.
Thanks.
October 01, 2007, 05:57 PM
Leah
Focus doesn't join at the reporting layer. The result set size is based on two ways of selecting, real fields and defined fields. If you are using defined fields in your selection you are probably getting much more back than you want. You might consider that if that is your issue.


Leah
October 01, 2007, 06:07 PM
GinnyJakes
Socrates,

My goodness. This is a huge topic to cover in a small amount of space. There are a lot of issues and I'm going to point you to some documentation. Since you are registered on this IBI site, go to the Advanced Search option that you see when you first log onto the tech support site. Type in RDBMS optimization and you should see a topic about optimizing joins.

RDMBS optimization varies with the data source. For instance more stuff is passed if the request is to DB2 than to Teradata for instance. Lots of things turn off optimization, like the SET ALL parameter.

If you could provide your code and the masters and the data source type, that would be helpful.

Assuming you are using TABLE and not passthru, you can put the trace commands below at the beginning of your program to trace it. Make sure the output format is HTML and when you get your empty report, right-click, View Source, scroll down to the bottom and then post the results of the trace here. I'll be able to tell what is going on. I do a lot of this with my users so I have a bit of experience.

Here are the trace commands:

SET TRACEOFF = ALL
SET TRACEON = SQLAGGR//CLIENT
SET TRACEON = STMTRACE//CLIENT
SET TRACEON = STMTRACE/2/CLIENT
SET TRACEUSER = ON
SET XRETRIEVAL=OFF

Note that the last command traces the code but does not retrieve data.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
October 02, 2007, 09:37 AM
cburtt
Have you thought about defining 'views' in your RDBS and targeting FOCUS at them instead of at the 'real' RDBMS tables? We use this technique a lot and it really speeds up the execution of Focus procedures.

Many WebFOCUS reporting applications don't need all the data that's in the associated RDBMS tables, and many reports use the same basic tables, joins, filters, and calculations. So, for ease and speed we define RDBMS views that perform common joins, incorporate common row selection, omit data fields not relevant to the application, perform common calculations (like extended price), and popular data conversions (like code cross reference look-ups). We generate synonyms for these instead of the underlying RDBMS.

Using RDBMS views for WebFOCUS reports can push a lot of the application's generic query and conversion stuff into the RDBMS where it's performed more efficiently.


WIN/2K running WF 7.6.4
Development via DevStudio 7.6.4, MRE, TextEditor.
Data is Oracle, MS-SQL.