|
|
|
Junior Member
      
Group: Forum Members
Last Login: 8/1/2006 12:37:00 PM
Posts: 22,
Visits: 1
|
|
Hi all, Is the orde of columns in the collect statistics statemen important or no? e.g. COLLECT STATISTICS ON table_1 COLUMN (column_2, column_1); or COLLECT STATISTICS ON table_1 COLUMN (column_1, column_2); Thanks in advance
|
|
|
|
|
Junior Member
      
Group: Forum Members
Last Login: 5/2/2008 2:28:55 AM
Posts: 15,
Visits: 2
|
|
|
I do not think it makes any difference. When different column combinations are analyzed, the combined stats are analyzed. Based on this analysis, optimizer estimates the combined cost.
|
|
|
|
|
Junior Member
      
Group: Forum Members
Last Login: 8/1/2006 12:37:00 PM
Posts: 22,
Visits: 1
|
|
Hi Phany Thanks for the reply. Does exist a place in the teradata documentation, where it is mentioned?
greetings stami
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 7/5/2009 2:58:22 PM
Posts: 134,
Visits: 13
|
|
It may be important for covered indexes. For normal columns, i am not that sure.
Vinay
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 11/5/2009 4:40:02 PM
Posts: 717,
Visits: 466
|
|
Hi stami27, there's no difference, if you collect stats on (col1, col2) or (col2, col1), because both stats are calculated exactly the same. Simple try it and then use a help stats: The order is defined by the column position within the create table, this behaviour is similar to a "create index(col1, col2)" or "create index(col2, col1)", both are the same in Teradata (unless you use a order by).
Dieter
|
|
|
|