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     [SOLVED] Query running much longer in webfocus than directly in SQL Server 2005

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Query running much longer in webfocus than directly in SQL Server 2005
 Login/Join
 
Platinum Member
posted
I have a simple query which when run thru webfocus is running for 13 min where as when run directly on the sql server 2005 is taking 30 seconds. Any ideas on how to resolve or trouble shoot this issue...?


SET SQLENGINE = SQLMSS
SQL SET SERVER CON02
SQL SQLMSS PREPARE SQLOUT FOR
SELECT
T1."AgentNumberID",
T1."AgentNumber",
T1."StatCode",
T1."EffectiveDate",
T1."TerminatedDate",
T1."AnnuityCommissionLevel",
T1."LifeCommissionLevel",
T1."FinalExpenseCommissionLevel",
T1."PoliciesInForce",
T1."StatusName",
T2."TransactionDateID",
T2."PaidProduction",
T2."SubmittedProduction",
T2."PaidCount",
T2."SubmittedCount"
FROM SrsDataMart.dbo.AgentNumberDimension T1,
SrsDataMart.dbo.PolicyFact T2
WHERE (T2."AgentNumberID" =
T1."AgentNumberID") AND (T1."AgentNumber" = 'CD018');
END

TABLE FILE SQLOUT
PRINT *
END

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


App Studio Version 8202
windows Platform
SQL Server 2008/2012
 
Posts: 183 | Location: TX | Registered: January 22, 2007Report This Post
Virtuoso
posted Hide Post
What if you just leave out the 'PREPARE SQLOUT FOR'?
I seem to remember (but correct me if I'm wrongly remembering - anyone?) that the prepare sqlout results in mssql returning the data set record by record when asked for one. That would explain the difference in duration.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Expert
posted Hide Post
Both these fexes take the same amount of time to retrieve 40,000 rows - 3 secs.

pgm1
SET SQLENGINE=DB2

SQL
SELECT
*
FROM bslc.time_d T1
-*where T1.FISCAL_YEAR = '2009'
;
TABLE ON TABLE HOLD AS SQLOUT
END
-RUN

pgm2
SET SQLENGINE=DB2

SQL PREPARE SQLOUT FOR
SELECT
*
FROM bslc.time_d T1
-*where T1.FISCAL_YEAR = '2009'
;
END
-RUN

How many rows are you retrieving?


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
It takes 13 min with or without PREPARE SQLOUT FOR.

I am trying to retrive around 1800 rows of data. I am really not sure where to start trouble shooting this as SQL server returns results in 30 seconds...


App Studio Version 8202
windows Platform
SQL Server 2008/2012
 
Posts: 183 | Location: TX | Registered: January 22, 2007Report This Post
Expert
posted Hide Post
I'd test a request with the simplest SQL, something like this:

SELECT
*
FROM schema.table
FETCH FIRST 1 ROWS ONLY
;

If this takes longer than a second, I'd check with the WebFOCUS administrators - there could be something wrong with the connections settings of the SQL Server adapter.

This message has been edited. Last edited by: Francis Mariani,


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
This was solved by putting
ENGINE SQLMSS SET CURSORS CLIENT

with help from ibi tech support.


App Studio Version 8202
windows Platform
SQL Server 2008/2012
 
Posts: 183 | Location: TX | Registered: January 22, 2007Report This Post
Gold member
posted Hide Post
Could you post the final code you ended up using? I have a similar problem with SQL Server.
 
Posts: 60 | Location: Ellensburg Washington | Registered: May 22, 2009Report This Post
Expert
posted Hide Post
quote:
ENGINE SQLMSS SET CURSORS CLIENT


Look at the documentation: Adapter Administration for UNIX, Windows, OpenVMS, i5/OS, and z/OS > Customizing the Microsoft SQL Server Environment > How to Specify the Cursor Type


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report 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     [SOLVED] Query running much longer in webfocus than directly in SQL Server 2005

Copyright © 1996-2020 Information Builders