As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
I JOIN two Masters that correspond to MS SQL Server Views and I get the following SQL Trace message:
[code] (FOC2510) FOCUS-MANAGED JOIN SELECTED FOR FOLLOWING REASON(S): (FOC2505) A SEGMENT IN THE STRUCTURE IS NON-KEYED: : XXX {/code] This results in an inefficient request.
As far as I can tell, aren't all SQL Server views non-keyed, unless it's an Indexed View?
I have created many views and do not get this message when joining them, I'm trying to figure out why I get the message with this particular JOIN.
Thanks,
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
While I agree with you, John, it is not always wise to do in some shops. I have a 228 page document that lists all of the masters that we have. While not all are relational, most are and we have a rule to not modify the generated master or access file by hand as it would become a maintenance nightmare.
And in the scenario I described above, KEYS=1 would not solve the problem if the key is the 2nd column in the master. We either wind up doing the join in the reverse order or use some other technique to architect the report.
The ideal solution would be for the SQL Translator to ignore the postion of the join-to field in the master if it is a homogeneous join against a relational engine and let the engine worry about whether the field is indexed or not.
Originally posted by Francis Mariani: As far as I can tell, aren't all SQL Server views non-keyed, unless it's an Indexed View? Thanks,
yes, from my limited memory, that is correct - but im baffled as to why one type of view works but another doesn't, and can only think that mnaybe the problem view is actually referencing other views where the working views are going straight against tables?!??!
Developer Studio 7.64 Win XP Output: mostly HTML, also Excel and PDF
"Never attribute to malice that which can be adequately explained by stupidity." - Heinlein's Razor
Posts: 285 | Location: UK | Registered: October 26, 2007
The message that Francis is getting is coming from the SQL Translator not from the data base. I sincerely believe that this problem is caused by how the master and access file are parsed. The code never gets to the backend or you would see an RDBMS message as well as a FOCUS message.
I agree it's wrong-headed of IBI to manage the join, and deny the database server the opportunity to optimize, based on whether the join fields are the primary index (or indexed at all). That runs counter to fundamental relational database principles. At the least, there should be a means of controlling that behavior ("OPTIMISE=REGARDLESS"?)
But meanwhile a suggestion ... Using primary key as the criterion for optimization seems to apply only to dynamic joins (JOIN command). Instead, try creating and using a synonym with embedded joins. That should sidestep the KEYS= issue and allow optimization to take place without regard to the second table's primary key declaration, since the synonym of the join structure is self-contained, and the 'indexed' nature of the fields is stated (whether true or not for the underlying tables) in the KEYFLD and IXFLD declarations.
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
And in the scenario I described above, KEYS=1 would not solve the problem if the key is the 2nd column in the master. We either wind up doing the join in the reverse order or use some other technique to architect the report.
The ideal solution would be for the SQL Translator to ignore the postion of the join-to field in the master if it is a homogeneous join against a relational engine and let the engine worry about whether the field is indexed or not.
A. Ginny we use the Oracle and Sequel Server adapters and join to a foreign key works regardless of whether the foreign key is encompassed in the settings of keys. Otherwise most joins would be wf managed. The only setting that deoptimizes is keys=0.
B. Remember that multipath retrieval will deoptimize what might be a logical rdbms result. As a result I also usually code all rdbms joins as unique and only worry about ALL for wf databases. and
C. Also non homogenous adapters deoptimizes unless wf databases are at the leaf nodes of the tree.
You need to be sure that what you are seeing is A. not B. or C. as the cause of deoptimization.
Of course I have different adapters but I can't see why IBI would throttle their performance by deoptimizing so many joins...
Regards
John
Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2 Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006