{"id":620,"date":"2014-08-26T13:30:35","date_gmt":"2014-08-26T13:30:35","guid":{"rendered":"http:\/\/tomvanmaanen.nl\/?p=620"},"modified":"2014-08-26T13:30:35","modified_gmt":"2014-08-26T13:30:35","slug":"teradata-what-columns-to-choose-as-primary-index","status":"publish","type":"post","link":"http:\/\/archief.van-maanen.com\/?p=620","title":{"rendered":"Teradata: what columns to choose as Primary Index?"},"content":{"rendered":"<p>A major question with Teradata tables is what columns to choose when a primary index must be created.<br \/>\nI understand that 4 different arguments might be used:<br \/>\n1: Is the column often accessed? If it is often accessed, best usage is made of the distibution of records over the different amps.<br \/>\n2: Is the column used in joins: in that case a similar argument holds. If the column is used in a join condition, usage is made of the distribution of records over the different amps.<\/p>\n<p>&nbsp;<br \/>\n<a href=\"http:\/\/tomvanmaanen.nl\/wp-content\/uploads\/2014\/08\/PrimaryIndex.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-616\" src=\"http:\/\/tomvanmaanen.nl\/wp-content\/uploads\/2014\/08\/PrimaryIndex.jpg\" alt=\"TERADATA_FALLBACK\" width=\"480\" height=\"360\" \/><\/a><\/p>\n<p>&nbsp;<br \/>\n3: Is the column often updated. If a culumn is updated, the record might be re-allocated to another amp. Hence, the less updates, the better it is to have it included in a primary index.<br \/>\n4: Is the cardinality high. In that case, it is possible to distribute the records over many amps, enabling Teradata to make optimal usage of the primary index capability.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A major question with Teradata tables is what columns to choose when a primary index must be created. I understand that 4 different arguments might be used: 1: Is the column often accessed? If it is often accessed, best usage is made of the distibution of records over the different amps. 2: Is the column [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":760,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-620","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-nice-to-know"],"_links":{"self":[{"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/posts\/620","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=620"}],"version-history":[{"count":0,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=\/wp\/v2\/posts\/620\/revisions"}],"wp:attachment":[{"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=620"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=620"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/archief.van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=620"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}