View previous topic :: View next topic
|
Author |
Message |
djgoer
New User
Joined: 08 Jan 2009 Posts: 7 Location: Philippines
|
|
|
|
Hello,
Is there a way for me to find out what the clustering index is for a particular table? Is there a catalog in which these can be found?
Thanks. |
|
Back to top |
|
|
Ketan Varhade
Active User
Joined: 29 Jun 2009 Posts: 197 Location: Mumbai
|
|
|
|
Hi,
You can use the catalog manager to find the cluster index, you can even query it to find it out |
|
Back to top |
|
|
djgoer
New User
Joined: 08 Jan 2009 Posts: 7 Location: Philippines
|
|
|
|
I tried to query the SYSCAT catalogs, however I got a SQL -204 error. Any idea as to why I am getting this error code? Does this have anything to do with access? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
... however I got a SQL -204 error. Any idea as to why I am getting this error code? |
do You realize that the manuals are there to answer exactly this type of questions ?
SYSCAT is not a DB2 term
( to be sure I just searched the manuals, and the only 2 occurences of the syscat word were errors
SYSCAT.XSROBJECTS instead of SYSIBM.XSROBJECTS)
anyway the DB2 tables have name of the form "SYSIBM.xxxxxxxxx"
and maybe the table to query is "SYSIBM.SYSINDEXES" |
|
Back to top |
|
|
Ketan Varhade
Active User
Joined: 29 Jun 2009 Posts: 197 Location: Mumbai
|
|
|
|
Can you post the query which you have tired? |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hello Djoger,
You can try below query
Code: |
Select CLUSTERING
From SYSIBM.SYSINDEXES
Where NAME ='Index-name'
And CREATOR='owner' |
If Query return Y then its a clustering Index otherwise not |
|
Back to top |
|
|
djgoer
New User
Joined: 08 Jan 2009 Posts: 7 Location: Philippines
|
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hello Djgoer,
You can try following query as well
Code: |
Select Name
Where TBNAME='OGN_BUS_ETY_AUD'
and TBCREATOR='OWNER'
and CLUSTERING = 'Y' |
Would you please clarify the reason for using SYSIBM.SYSKEYS in your query? |
|
Back to top |
|
|
djgoer
New User
Joined: 08 Jan 2009 Posts: 7 Location: Philippines
|
|
|
|
Hello Guptae,
Using SYSIBM.SYSKEYS gives me the Column Name directly, whereas if I don't use it, all I would get is the Index Name.
Thank you all for your help! :-)
Regards. |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
reason for mentioning SYSCAT is DB2luw (see provided link to publicboulder)
luw = Linux Unix Windows |
|
Back to top |
|
|
|