Unix Technical Forum

Type-2 index question

This is a discussion on Type-2 index question within the DB2 forums, part of the Database Server Software category; --> I look at the table indexes of the system tables to see what kind of indexes in UDB V8. ...


Go Back   Unix Technical Forum > Database Server Software > DB2

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 03:29 AM
cmc
 
Posts: n/a
Default Type-2 index question

I look at the table indexes of the system tables to see what kind of indexes
in UDB V8.

Here is my command:
SELECT DISTINCT INDEXTYPE FROM SYSCAT.INDEXES

I got indextype "REG" returned.

My questions:
1. What is REG stand for (seems REGULAR) - type-2 ? What could be other
values ?
2. Where I can figure which index type is used by a table (I suppose the
best place in SYSCAT.TABLES cause onle one index type allowed in any table
but not able to find any column seems related) ? I tried INSPECT as
following:
INSPECT check table name SYSTABLES schema SYSIBM index normal results
keep AABB.lis

But not able to see anything (not even the file).

Thanks for any help
Tom


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 03:29 AM
Keith
 
Posts: n/a
Default Re: Type-2 index question

1. REG is for regular. Others can be blok (block), clus (cluster), dim
(dimension block).

2. try this (after your inspect command): db2inspf AABB.lis AABB.out
You can now view AABB.out and find out your index type. In V8, it's
always Type-2, unless you've migrated from V7 and didn't convert
indexes from type-1 to type-2.

Keith Ponnapalli
IBM Certified Advanced Database Administrator - DB2 UDB V8.1 for Linux,
UNIX, and Windows
INFORMIX Certified Database Administrator

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-27-2008, 03:29 AM
Mark A
 
Posts: n/a
Default Re: Type-2 index question

"cmc" <cmc3232@yahoo.com> wrote in message
news:S5d9e.8804$Jg5.511704@news20.bellglobal.com.. .
>I look at the table indexes of the system tables to see what kind of
>indexes
> in UDB V8.
>
> Here is my command:
> SELECT DISTINCT INDEXTYPE FROM SYSCAT.INDEXES
>
> I got indextype "REG" returned.
>
> My questions:
> 1. What is REG stand for (seems REGULAR) - type-2 ? What could be other
> values ?
> 2. Where I can figure which index type is used by a table (I suppose the
> best place in SYSCAT.TABLES cause onle one index type allowed in any table
> but not able to find any column seems related) ? I tried INSPECT as
> following:
> INSPECT check table name SYSTABLES schema SYSIBM index normal results
> keep AABB.lis
>
> But not able to see anything (not even the file).
>
> Thanks for any help
> Tom
>

The values for INDEXTYPE are in the Appendix D of the SQL Reference Vol 1
,where the catalog tables are documented.

If you reorg all your index, they will become type 2 if they were previously
type 1.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-27-2008, 03:29 AM
cmc
 
Posts: n/a
Default Re: Type-2 index question

Seems INDEXTYPE is not a good way to tell the index is type 1 or 2 because I
suppose a REGULAR index can be type 1 or 2 UDB V8 (while other type
CLUS/DIM/BLOK must be TYPE-2).
Back to my orginal question:
Is there a direct way to tell a table is using type-1 or type-2 index
(without using INSPECT CHECK TABLE as I cannot get it work) ?

Thanks
Tom

"Mark A" <nobody@nowhere.com> wrote in message
news:5e2dnWG5q97OEPjfRVn-pg@comcast.com...
> "cmc" <cmc3232@yahoo.com> wrote in message
> news:S5d9e.8804$Jg5.511704@news20.bellglobal.com.. .
> >I look at the table indexes of the system tables to see what kind of
> >indexes
> > in UDB V8.
> >
> > Here is my command:
> > SELECT DISTINCT INDEXTYPE FROM SYSCAT.INDEXES
> >
> > I got indextype "REG" returned.
> >
> > My questions:
> > 1. What is REG stand for (seems REGULAR) - type-2 ? What could be

other
> > values ?
> > 2. Where I can figure which index type is used by a table (I suppose

the
> > best place in SYSCAT.TABLES cause onle one index type allowed in any

table
> > but not able to find any column seems related) ? I tried INSPECT as
> > following:
> > INSPECT check table name SYSTABLES schema SYSIBM index normal results
> > keep AABB.lis
> >
> > But not able to see anything (not even the file).
> >
> > Thanks for any help
> > Tom
> >

> The values for INDEXTYPE are in the Appendix D of the SQL Reference Vol 1
> ,where the catalog tables are documented.
>
> If you reorg all your index, they will become type 2 if they were

previously
> type 1.
>
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:00 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com