Focal Point
[SOLVED] how to run multiple queries at same time in one fex

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

June 11, 2020, 03:01 PM
Brandon Andrathy
[SOLVED] how to run multiple queries at same time in one fex
Hello,

I am wondering if there is a command in web focus where you can run multiple table file queries against a data warehouse at the same time.

So for example, I want to run the below two queries at the same time in a single .fex instead of one at a time.

TABLE FILE CAR
SUM
RETAIL_COST
BY COUNTRY
END

TABLE FILE CAR
SUM
DEALER_COST
BY COUNTRY
END

This message has been edited. Last edited by: Brandon Andrathy,


WebFOCUS 8204
June 11, 2020, 06:13 PM
FP Mod Chuck
Brandon

There is no way to do that as when the query is submitted it uses an available agent on the reporting server and there is no pre-processing to tell it to use more than one agent.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
June 12, 2020, 09:00 AM
Danny-SRL
Brandon,
What do you mean by "at the same time"?
What do you want to achieve?


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

June 12, 2020, 10:33 AM
Brandon Andrathy
Hey All,

So my goal is to have queries in a .fex run at the same time instead of sequentially so that they don't take as much time.

I could run them in separate .fexes in the BIP however, I have some javascript at the bottom of the fex that refreshes all of my other tiles once this .fex runs.

Pseudo code below:

 

TABLE FILE CAR
SUM
RETAIL_COST
BY COUNTRY
ON TABLE HOLD AS 'FOCCACHE/HOLD1'
END

TABLE FILE CAR
SUM
DEALER_COST
BY COUNTRY
ON TABLE HOLD AS 'FOCCACHE/HOLD2'
END

function myFunction()
{
var frameArray = [ "Panel_1_1", "Panel_2_1"];
parent.BipIframeInterface.refresh(parent.BipIframeInterface.REFRESH_ALL_BUT_ARRAY, name, frameArray);
}

 


If I do put both of my table files in separate fexes, I'd like to be able to refresh my tiles only when both .fexes have run.

Hoping there's an easier way to request both table files to be run on SQL Server at the same time.

I have something complicated in mind as a worst case where I refresh an individual tile, pass a parameter back to the master .fex and go to different parts of the code that then goes down to the javascript to refresh the tiles. Hoping I don't have to do that.


WebFOCUS 8204
June 12, 2020, 11:01 AM
Brandon Andrathy
this thread looks exactly like what I need.

http://forums.informationbuild...587038595#3587038595

Jack Gross said this: "Have the "parent" fex return an initial html page, which on load submits N forms, one for each of the "child" fexes, to run them in parallel"

Does anyone have an idea what the code would look like for this? Has something else been developed 9 years later in this regard?


WebFOCUS 8204
June 12, 2020, 11:34 AM
Frans
So are you doing all of this for performance issues of 2 Reports? In that case I would try other options, like persisting data or generating data at logon when the query itself can't be improved.


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
June 12, 2020, 11:50 AM
Brandon Andrathy
Hey Frans, thanks for the reply.

I have tried the persisting data via App Path. Unfortunately that won't work as it's too much maintenance on the developer side.

AS far as generating data at logon, are you saying run all the queries only once when the user first gets on and then refreshing all the tiles with javascript? Or are you referring to the foccache server setting?


WebFOCUS 8204
June 12, 2020, 03:00 PM
Brandon Andrathy
ok i figured all this out. I created an HTML wrapper with 4 report iframes that ran the agents separately. then passed the parameters to FOCCACHE and now all my other reports are feeding from that. I think I'm good to go.

Thanks all for the help


WebFOCUS 8204