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     [CLOSED] MS SQL Server View vs Table

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] MS SQL Server View vs Table
 Login/Join
 
Member
posted
Hello,

Our DBA recently set up a materialized view of a fact table in our data mart. The structure is identical to the old table. I have a fex that runs against a synonym for the old table that comes back in 30 - 50 sec. A new fex runs against the view in 5 min plus. Same WHEREs BYs etc. The joins to the dimensions are set up in the synonym in the same order. Everything identical so far as I can tell.

One additional note: When I create the synonym, it doesn't automatically pull in the tables connected to the foreign keys - even if I check the box. I have to add the joins to the dimension tables myself in the synonym editor. But I have been careful to construct them in the same way.

Anyone have a recommendation on where to start to dig up what might be causing the speed differences? Are there known issues with Views that others have encountered?

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


WebFOCUS 7701
Windows 2008
All Formats

 
Posts: 17 | Registered: August 05, 2010Report This Post
Expert
posted Hide Post
Unless things have changes in SQL Server, the view will return all data from all tables in the view.

This may be one reason.

There also must be some SQL Server analysis of the query, that can test the SQL generated.


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
Member
posted Hide Post
Thanks Waz. My Data Architect grabbed one of the sql queries yesterday to test. Haven't heard any results yet. I'll pass along the other idea.


WebFOCUS 7701
Windows 2008
All Formats

 
Posts: 17 | Registered: August 05, 2010Report This Post
Virtuoso
posted Hide Post
Why do you have a VIEW on a single SQL table?

Is it sure the VIEW only uses that special tabel or are there some hidden joins to other tables?




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Virtuoso
posted Hide Post
There must be a difference somewhere. IF everything is identical, then the response would also be identical. Which it isn't, so there is a difference. What I'd do is to check if the sql being generated by webfocus is indeed identical. You can do this easily by switching on tracing and prohibiting actual retrieval of the records. If that sql is indeed exactly the same, then I'd search for the cause of the problem in the definition or structure of the mv in the database. If the sql is not the same, then there may be a difference somewhere in the master file(s) that causes the problem.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Virtuoso
posted Hide Post
A materialized view is not really a view, rather, it is a cached table. Have your DBA check on defined indexes for the view. I can almost guarantee they are buggered.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Member
posted Hide Post
As already suggested, trace the SQL from both the old and the new requests to ensure that they are in fact the same.

Second, please verify your view. To my knowledge, SQL Server does not have materialized views, but instead has what is called indexed views.

Third, if all of the above is true, have the DBA view the actual execution path of both queries. Even though the requests may appear to be the same, a view may end up using a different path than to retrieve the data than normal due to lack of indexes or statistics.

My guess would be that it is doing all aggregations at the end of the request and utilizing a significant amount of memory in SQL Server.

The last can also be caused if you are attempting to get distinct lists via WebFOCUS. WebFOCUS tries to add an aggregation function to a request that only contains BY fields which can also cause the above to occur. To resolve that issue, try to sum a numeric field or count on the primary key.


WebFOCUS 8.1.04; SQL Server 2012; Windows 7; Windows Server 2012 R2;
 
Posts: 26 | Registered: November 21, 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     [CLOSED] MS SQL Server View vs Table

Copyright © 1996-2020 Information Builders