Secondary index Subtable
Teradata Teradata Discussion Forums Teradata.com Discussion Forum
Visit Teradata.com
Home       Guidelines    Member List
Welcome Guest ( Login | Register )
        


This online forum is for user-to-user discussions of Teradata products, and is not an official customer support channel for Teradata. If you require direct assistance, please contact Teradata support.


Secondary index Subtable Expand / Collapse
Author
Message
Posted 6/30/2006 11:28:06 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 7/12/2006 10:09:00 AM
Posts: 4, Visits: 1
Hi,

Could you please tell me What is the DDL of Secondary index subtable ? I just wanted to know what are the Columns will be there in the secondary index subtable and the Meaning of those columns.

Thanks
Farid Khan Pathan.
Post #4498
Posted 6/30/2006 1:27:32 PM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: 6/9/2008 2:55:55 PM
Posts: 185, Visits: 2
I'm not sure I understand your question.

The secondary index subtable is a "hidden" table automatically maintained by Teradata when you create a secondary index on a table. The DDL to create a secondary index is something like:

create index(col1, col2, etc.) on databasename.tablename;

or you can specify an additional "index" clause when creating the table to build secondary indexes.

You can view the columns contained in secondary indexes by selecting from dbc.indices.

Hope that helps.

Post #4501
Posted 8/28/2006 11:27:26 PM
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Group: Forum Members
Last Login: 2/18/2008 4:01:01 AM
Posts: 30, Visits: 14
you may see it in dbc.tables
Post #5009
Posted 8/29/2006 4:12:44 AM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: 2 days ago @ 3:41:05 AM
Posts: 522, Visits: 264
Hi Farid,
you'll find all the details in the manuals:
Database Design

Chapter 11: Secondary Indexes
Unique Secondary Indexes
Nonunique Secondary Indexes

Chapter 15: Database-Level Capacity Planning Considerations
Sizing a Unique Secondary Index Subtable
Sizing a Nonunique Secondary Index Subtable


There's no DDL for a index subtable, but it's similar to base tables with following definition:

USI:
create unique index USI(i int) on tab;

create table USI(
internal_overhead byte(7),
i int,
baseROWID byte(8) -- or byte(10) for a partitioned table)
unique primary index(i);


NUSI:
create index NUSI(i int) on tab;

create table NUSI(
internal_overhead byte(7),
i int,
baseROWIDa array of byte(8) -- or byte(10) for a partitioned table)
[non-hashed AMP-local primary] index(i);

That kind of NUSI-PI can't be created on a base table, that's why there's no easy way to calculate the exact size of a NUSI.

Dieter
Post #5010
Posted 8/29/2006 6:06:14 AM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 10/11/2006 6:05:00 AM
Posts: 23, Visits: 1
If you want to know the Diskspace size of your subtable(s) you can COLLECT DEMOGRAPHICS on the base table into a QCD of your choice
Post #5013
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 ( 0 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.


All times are GMT -5:00, Time now is 5:41am

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.078. 7 queries. Compression Disabled.