|
Archives of the TeradataForumMessage Posted: Mon, 28 Jan 2008 @ 14:14:56 GMT
Thanks for the contributions about Stats. Just for feedback, in the end I opted for the following approach: Derive a string of Primary Index columns using a Cursor on, SELECT ColumnName AS TAB_COL FROM dbc.Indices IN1 WHERE databaseName = ':IN_DB' AND TABLENAME = ':IN_TB' AND IN1.IndexType = 'P' ORDER BY IN1.ColumnPosition ; This, with a bit of concatenation, gives me something like 'COL1,COL2,COL3' I then used the Help Statistics on the TABLE, grabbing the output and checking whether the first column (which is the actual table column) equals the generated string. If it does then I've got the Stats for the Primary Index. Why did I do it this way ? Mainly because HELP STATISTICS MyTable index (indexColumn1 [, indexCOlumn2]); is frustratingly slow, and at least the Stats provided for by the basic "HELP STATISTICS MyTable" gives exactly the output I want - and it's fast. Dave Clough
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||