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     How to access non-clustered indices in MS SQL

Read-Only Read-Only Topic
Go
Search
Notify
Tools
How to access non-clustered indices in MS SQL
 Login/Join
 
Member
posted
I am creating a meta data report for our users TABLEing against SYSTABLE and SYSCOLUM. Unfortunately they do not see non-clustered indices on MS Sequel Server tables of which we have many.

Currently I am using the workaround of editing the MFD's and adding DESCRIPTION='KEY" and filtering on it in my request. But this require manual maintenance of the MFD's. I am also considering creating a description table, but this is also manual maintenance.

Is there some other, automated way to do so?

Thanks


WebFOCUS 7.1.3 and 7.6.1 (in migration)
Windows Server 2003 R2
Output: HTML, Excel, PDF
 
Posts: 3 | Registered: September 28, 2007Report This Post
Master
posted Hide Post
wf does not need to know about any indicies in MS SQL.

To get info on these go to the data dictionaries built in to SQL Server. In this example tables are prefixed with SQLSERVER_.

JOIN CLEAR *
JOIN ID IN sqlserver_sysobjects TO ID IN sqlserver_sysindexes AS J1
JOIN NAME IN SQLSERVER_SYSOBJECTS TO TABLE_NAME IN SQLSERVER_TABLES AS J2
TABLE FILE sqlserver_sysobjects
SUM MAX.ROWCNT BY NAME BY TABLE_SCHEMA BY TABLE_CATALOG NOPRINT
WHERE XTYPE EQ 'U'
WHERE TOTAL MAX.ROWCNT GE &MINRECS
ON TABLE SET LINES 999999
ON TABLE SET STYLE *
TYPE=DATA, COLUMN=NAME, FOCEXEC=ALLMSS(TOD=&TOD.QUOTEDSTRING GOTO=2 CONNECTION=&CONNECTION.QUOTEDSTRING UNIDB=TABLE_CATALOG UNIOWNER=TABLE_SCHEMA UNITABLE=NAME RETRIEVAL=&RETRIEVAL),$

END



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
 
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006Report This Post
Guru
posted Hide Post
Hi,

As mentionned wf does not need to know about sql indexes. Bu at the end wf will send a query to sql server. In that query there are joins selects and so on.
If the concerned tables does not have indexes we should expect performance issues.
If the query sent by webfocus to sql server is not built correctly, this will not trigger sql server to use indexes and it will result in table scanning.
Majid.


WebFocus 7.6.5
AND WebLogic server as web server
sql2005 as database server
 
Posts: 273 | Location: Europe | Registered: May 31, 2007Report This Post
Platinum Member
posted Hide Post
I'm with Majid on this one. While WF does not need to know, the programmer probably should. Knowing what indexes are and are not available might lead them to code their program in a such a way to try to take advantage of the indexes that are there and avoid performance issues.


Data Migrator 5.3, 7.1, 7.6
WebFOCUS 7.1, 7.6, 7.7
SQL Server, Oracle, DB2
Windows
 
Posts: 126 | Registered: January 18, 2007Report This Post
Member
posted Hide Post
Thanks all.

It took a bit of stumbling around in our MS Sequel Server to find the right locations, but this should give me what I need.

BTW, I am aware that WF doesn't need to know about these indices, the RDBMS does. This is only so I can create meta data listings for our report developers so they can (hopefully) code more efficient Join's and Where's by knowing which columns are indexed.


WebFOCUS 7.1.3 and 7.6.1 (in migration)
Windows Server 2003 R2
Output: HTML, Excel, PDF
 
Posts: 3 | Registered: September 28, 2007Report This Post
Master
posted Hide Post
Gregg, in response to your last statement.
Give your developers the query plan for queries in question, and index the snot out of your tables. It's not a bad thing to have a tremendous amount of indexes, unless you do a lot of DML (insert's, update's, delete's) on the table as all those indexes have to be modified as well.

We're running db2 on an iseries. I use the tool IBM provides to build a tremendous amount of indexes over our more heavily used datawarehouse tables.


Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.
 
Posts: 611 | Registered: January 04, 2007Report This Post
Gold member
posted Hide Post
Hi, Gregg

I suppose it will be better not TABLEing against WebFOCUS metadata, but MSSQL metadata directly.
E.g.
SQL SQLMSS
SELECT 
    SO.id
    ,Table_name = SO.name
    ,index_name = SI.name
    ,SI.indid 
    ,index_status = SI.status
    ,SIK.keyno
    ,field_name = SC.name
  FROM 
    sysobjects SO
    JOIN sysindexes SI ON SO.id = SI.id
    JOIN sysindexkeys SIK ON SIK.id = SI.id AND SIK.indid = SI.indid
    JOIN syscolumns SC ON SC.id = SIK.id AND SIK.colid = SC.colid    
  WHERE
    SO.xtype = 'U'
    AND SO.id = 2105058535
    AND (SI.status & 8388608) <> 8388608 
    AND (SI.status & 16777216) <> 16777216
  ORDER BY
    SO.id, SI.indid, SIK.keyno
END


If you want more descriptions :
a) look at SELECT * FROM master.dbo.spt_values WHERE type = 'I'
b) look at master.dbo.sp_helpindex and reap what you need.

Regards


WF 7.6.2, WinNT/2K, MSSQL 2K, MSOLAP 2K, BID
 
Posts: 79 | Location: Moscow | Registered: April 27, 2007Report 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     How to access non-clustered indices in MS SQL

Copyright © 1996-2020 Information Builders