Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SHARING] WebFOCUS Coding Techniques for Best Efficiency

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SHARING] WebFOCUS Coding Techniques for Best Efficiency
 Login/Join
 
Gold member
posted
At my client site, performance has suddenly become a focus of attention by management. Most of the time it takes to run reports is query time (we mainly use SQL Passthru to Oracle), and there are initiatives ongoing to look at the database and queries to make them as efficient as possible.

The question I want to pose to the forum is more related to making WebFOCUS/Dialogue Manager code as efficient as possible. I have seen posts that talk to specific issues, but I would like to be more general in scope.

Are there any practices that you have found that are more efficient than others? One example I did find in searching through the forum is to use COMPUTEs instead of DEFINEs where possible. I am interested in any thoughts there may be on this.

Thanks!

This message has been edited. Last edited by: Kerry,


WebFOCUS 8
 
Posts: 74 | Location: Gahanna, OH | Registered: September 22, 2009Report This Post
Gold member
posted Hide Post
In addition to indicating what are best practices for efficient coding, are there techniques that should be avoided?


WebFOCUS 8
 
Posts: 74 | Location: Gahanna, OH | Registered: September 22, 2009Report This Post
Expert
posted Hide Post
Some obvious ones:


  • Error checking
  • Try not to reuse hold files in the same procedure
  • Always clear you joins when not needed.
  • Same for defines
  • Document your code


After this you will get into specific instances, like best ways to join, when to join, join vs match, etc.

As you are using SQL to extract, I guess you don't need to understand the tables and indexes available.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
Always use SQL traces to see how your WF code is being parsed and sent to the relational database engine. SQL traces will allow you to tune your WF queries to avoid code that may hinder or disable optimization. You want the relational database to do as much of the work as possible when it comes to filtering, sorting, and aggregating. Non-optimized queries mean that WF has to do more of, or all of, that work. When you review the SQL generated by the SQL traces, you should look for three things: (1) the statement "AGGREGATION DONE" if you are using SUM or WRITE, (2) only one SELECT statement, and (3) all of your WF filters (WHERE/IF) represented in the SQL code. It is not always possible to pass every filter and all aggregations to the database. But the more work the database engine does, the faster your WF queries will run.


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Silver Member
posted Hide Post
There was a really good presentation about this at Summit. "Relational Efficiencies: Release 7.7 and Beyond" You might want to download the presentation at: http://www.informationbuilders...31837352296781807150

Have a great day,
Emily


WF 8.1.05 on Windows machines
Backend: Informix, SQL and Oracle databases
 
Posts: 37 | Location: Houston, Texas | Registered: May 01, 2008Report This Post
Master
posted Hide Post
As for Dialogue Manager, either avoid GOTO statements or keep your procedures short by using -INCLUDE. When executing a GOTO, DM always goes back to the top of the procedure to start searching for the label in the GOTO.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report This Post
Platinum Member
posted Hide Post
Hi John, from your bio we started using FOCUS the same year 1985 (it was a VERY good year!). You just reminded me about the use of "GOTO" in DM...Boy, this argument goes back to 1985 and before, I'm sure.

I'll just say the usage of that command, while truly problematic in languages such as BASIC, is a necessary evil in FOCUS/WebFocus. "-INCLUDE" is great from a Stuctures Programming point of view, but I can get just as lost looking at another programmers (or even my own) 500 line fex with a bunch of nested "-INCLUDE"s as I can looking at a gaggle of "-GOTO"s.

The cool thing about today as opposed to 1985 is ...WIKIPEDIA...

Here's a sentence to ponder from the article,
quote:
Some programmers, such as Linux Kernel designer and coder Linus Torvalds or software engineer and book author Steve McConnell also object to Dijkstra's point of view, stating that GOTOs can be a useful language feature, improving program speed, size and code clearness, but only when used in a sensible way by a comparably sensible programmer.
Of course, the key phase is "sensible programmer".

The full article can be found here.

David



In FOCUS since 1985 - WF 8.009/8.104 Win 8 Outputs: ALL of 'em! Adapters: Sql Server Teradata Oracle
 
Posts: 161 | Location: Dallas, TX | Registered: February 20, 2009Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SHARING] WebFOCUS Coding Techniques for Best Efficiency

Copyright © 1996-2020 Information Builders