Focal Point
[CLOSED]Save HOLD FILE Output as Native Temp Table Using VOLATILE VS GLOBAL_TEMPORARY

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

September 27, 2019, 09:35 AM
Riya
[CLOSED]Save HOLD FILE Output as Native Temp Table Using VOLATILE VS GLOBAL_TEMPORARY
Hi Webfocus users,
Can you please let me know which is the best way to create temporary hold files during the report run to use those temp files/tables as filters for other SQL pass through queries?

We have been using ON TABLE HOLD AS &TMPDITBL FORMAT DB2 PERSISTENCE VOLATILE
and we do SQL DROP TABLE after the report querying is done. We only use these for our complex reports where we are accessing multiple tables. But our DBA's complain that is not the best way to do the temp tables. When we use volatile it is creating the log of the file and the data in it and it takes up lot of resources on the database side.

I check this link but its not much help to decide which one to use VOLATILE or GLOBAL_TEMPORARY .
https://webfocusinfocenter.inf...ang/source/out97.htm

Any suggestion would be helpful. We are using WF 8.1.05 version

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8.1.05
Excel, PDF, Pivot, HTML
Windows
September 29, 2019, 11:08 AM
Doug
"ON TABLE HOLD AS &TMPDITBL FORMAT ALPHA" to create the temp hold file and "WHERE ThisField IN FILE ('&TMPDITBL.EVAL') as a filter.
Check the syntax as I don't have App Studio available to verify this...




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
September 29, 2019, 05:45 PM
Waz
IF you are using SAME_DB, then the option depends on who will access the table.

Are these other SQL pass through queries from the logged in user (Same session) ? Then use VOLATILE.

If its for other users, then use GLOBAL_TEMPORARY.


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!

September 30, 2019, 05:05 AM
Frans
The SQL DROP is not needed since the tables will be destroyed automatically after the session.

Another option is to use format SQL_SCRIPT.


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.