Naming Primary Indexes
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.


Naming Primary Indexes Expand / Collapse
Author
Message
Posted 9/27/2007 2:21:30 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 10/12/2007 11:47:00 AM
Posts: 2, Visits: 1
I need some helpe to name primary indexes.

select column1, column2, column3
from table name
with data
primary index (column1, column2, column3) How do I name this index

If I only insert into this table and collect statistics on the index name, is the table going to be skewd or is there a definition stored?





Thanks,

Select *

Post #9034
Posted 9/27/2007 2:53:08 PM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: 9/24/2008 11:55:46 AM
Posts: 168, Visits: 45
You can name your primary index as follows in table definitions itself

create table tablename
(
....
....
)
primary index index name ( column list)

You can collect statistics on Index as well as column list of primary index.Collection of statistics does not contribute to data skew.It just gathers statistical information about the values stored in the index/columns on which statistics are collected.


Leo Issac

"Wants to Learn More!"

Post #9037
Posted 9/27/2007 3:04:51 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 10/12/2007 11:47:00 AM
Posts: 2, Visits: 1
Thanks for your help.







Is it safe to assume that if I never drop table and only insert into it, I can just collect statistics on the index?

Collecting statistics on index will increase performance if using the index (seek or scan) correct?


Thanks,

Select *

Post #9038
Posted 9/28/2007 4:09:54 PM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: 9/24/2008 11:55:46 AM
Posts: 168, Visits: 45
Yes, you can just collect statistics on table whenever the table size grows.It is recommended to collect stats whenever there is 10% or more increase in table size(rows).

Collection of stats always helpful in improving query performance provided they are updated periodically based on table growth


Leo Issac

"Wants to Learn More!"

Post #9047
Posted 10/11/2007 12:57:23 PM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: Today @ 9:31:30 PM
Posts: 427, Visits: 403
Also some times you would find it helpful to collect stats on columns which are not part of indices, but are used in joins, where clause etc. as well as the special column PARTITION in case of PPI.

Again there's no single pill , but these are some good points to start with.
Post #9199
« 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 10:17pm

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.063. 8 queries. Compression Disabled.