{"id":1689,"date":"2018-08-14T11:44:30","date_gmt":"2018-08-14T11:44:30","guid":{"rendered":"http:\/\/dbtut.com\/?p=1689"},"modified":"2018-11-09T23:05:39","modified_gmt":"2018-11-09T23:05:39","slug":"primary-index-concept-in-teradata","status":"publish","type":"post","link":"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/primary-index-concept-in-teradata\/","title":{"rendered":"Primary index concept in Teradata"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>Every table must have\u00a0<b>at least one column<\/b>\u00a0as the Primary Index. The Primary Index is defined when the table is created.There are two reasons you might pick a different Primary Index then your Primary Key.<\/p>\n<p>They are (1) for Performance reasons and (2) known access paths.<\/p>\n<p><b>Primary Index Rules:<\/b><\/p>\n<p><i>Rule 1:<\/i>\u00a0One Primary Index per table.<br \/>\n<i>Rule 2<\/i>: A Primary Index value can be\u00a0<b>unique<\/b>\u00a0or\u00a0<b>non-unique<\/b>.<br \/>\n<i>Rule 3:<\/i>\u00a0The Primary Index value can be NULL.<br \/>\n<i>Rule 4:<\/i>\u00a0The Primary Index value can be modified.<br \/>\n<i>Rule 5:<\/i>\u00a0The Primary Index of a populated table cannot be modified.<br \/>\n<i>Rule 6:<\/i>\u00a0A Primary Index has a limit of 64 columns.<\/p>\n<p>Two Types of Primary Indexes (UPI or NUPI)<\/p>\n<p><u><b>Unique Primary Index<\/b><b>(UPI)<\/b><\/u><\/p>\n<p>A Unique Primary Index (UPI) is unique and cannot have any duplicates.<br \/>\nIf you try and insert a row with a Primary Index value that is already in the table, the row will be rejected.\u00a0<b>An UPI enforces UNIQUENESS for a column<\/b>.<\/p>\n<p>A Unique Primary Index (UPI) will always spread the rows of the table evenly amongst the AMPs. UPI access is always a\u00a0<b>one-AMP operation.\u00a0<\/b><\/p>\n<p>We have selected EMP_NO to be our Primary Index. Because we have designated EMP_NO to be a Unique Primary Index, there can be no duplicate employee numbers in the table.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/4.bp.blogspot.com\/-hlqeBrrPVCU\/Ujs8feX3axI\/AAAAAAAAAeg\/yzPBqvCEvWs\/s320\/Unique+Primary+Index.png\" alt=\"TeradataWiki-Teradata UPI\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><b><u>Non-Unique Primary Index (NUPI)\u00a0<\/u><\/b><\/p>\n<p>A Non-Unique Primary Index (NUPI) means that the values for the selected column can be non-unique.\u00a0<b>Duplicate values can exist<\/b>.<\/p>\n<p>A Non-Unique Primary Index will almost never spread the table rows evenly.<br \/>\nAn\u00a0<b>All-AMP operation\u00a0<\/b>will take longer if the data is unevenly distributed. You might pick a NUPI over an UPI because the NUPI column may be more effective for query access and joins.<\/p>\n<p>We have selected LAST_NAME to be our Primary Index. Because we have designated LAST_NAME to be a Non-Unique Primary Index we are anticipating that there will be individuals in the table with the same last name.<\/p>\n<div class=\"separator\"><a href=\"http:\/\/4.bp.blogspot.com\/-E38Ltvv6Lio\/Ujs8lXz5N_I\/AAAAAAAAAeo\/vk9ZeSrub40\/s1600\/NON+Unique+Primary+Index.png\"><img loading=\"lazy\" decoding=\"async\" title=\"TeradataWiki-Teradata UPI\" src=\"http:\/\/4.bp.blogspot.com\/-E38Ltvv6Lio\/Ujs8lXz5N_I\/AAAAAAAAAeo\/vk9ZeSrub40\/s320\/NON+Unique+Primary+Index.png\" alt=\"TeradataWiki-Teradata UPI\" width=\"320\" height=\"212\" border=\"0\" \/><\/a><\/div>\n<div><\/div>\n<div><b>Multi-Column Primary Indexes:\u00a0<\/b><\/div>\n<div>\n<p>Teradata allows more than one column to be designated as the Primary Index. It is still only one Primary Index, but it is merely made up by combining multiple columns together. Teradata allows up to\u00a0<b>64 combined columns<\/b>\u00a0to make up the one Primary Index required for a table.<\/p>\n<p>On the following page you can see we have designated First_Name and Last_Name combined to make up the Primary Index.<br \/>\nThis is often done for two reasons:<br \/>\n(1) To get better data distribution among the AMPs<br \/>\n(2) Users often use multiple keys consistently to query<\/p>\n<\/div>\n<div>\n<div class=\"separator\"><a href=\"http:\/\/3.bp.blogspot.com\/-oh7nEY0NyKI\/Ujs8rXyvriI\/AAAAAAAAAew\/q16jMCNQ5xk\/s1600\/Multi+Primary+Index.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/3.bp.blogspot.com\/-oh7nEY0NyKI\/Ujs8rXyvriI\/AAAAAAAAAew\/q16jMCNQ5xk\/s320\/Multi+Primary+Index.png\" width=\"320\" height=\"206\" border=\"0\" \/><\/a><\/div>\n<p><strong>SQL Syntax for Creating a Primary Index\u00a0<\/strong><\/p>\n<p><strong><u>\u00a0Creating a Unique Primary Index\u00a0\u00a0<\/u><\/strong><\/p>\n<\/div>\n<div>The SQL syntax to create a Unique Primary Index is:<\/p>\n<pre class=\"lang:default decode:true\">CREATE TABLE sample_1\r\n(col_a INT\r\n,col_b INT\r\n,col_c INT)\r\nUNIQUE PRIMARY INDEX\u00a0(col_b);<\/pre>\n<\/div>\n<div><\/div>\n<div><strong><u>Creating a Non-Unique Primary Index\u00a0<\/u><\/strong><\/div>\n<div>\n<p>The SQL syntax to create a Non-Unique Primary Index is:<\/p>\n<pre class=\"lang:default decode:true \">CREATE TABLE sample_2\r\n(col_x INT\r\n,col_y INT\r\n,col_z INT)\r\nPRIMARY INDEX\u00a0(col_x);<\/pre>\n<p>&nbsp;<\/p>\n<p><b><u>Data distribution using Primary Index\u00a0<\/u><\/b><\/p>\n<\/div>\n<div>\n<p>When a user submits an SQL request against a table using a Primary Index, the request becomes a one-AMP operation, which is the most direct and efficient way for the system to find a row. The process is explained below.<\/p>\n<\/div>\n<div>\n<div class=\"separator\"><a href=\"http:\/\/4.bp.blogspot.com\/-YcVTZHci5WQ\/UkBSWLQfjQI\/AAAAAAAAAiE\/T4ST7GsA6ho\/s1600\/Primary+Index.png\"><img loading=\"lazy\" decoding=\"async\" title=\"Teradata Primary Index\" src=\"http:\/\/4.bp.blogspot.com\/-YcVTZHci5WQ\/UkBSWLQfjQI\/AAAAAAAAAiE\/T4ST7GsA6ho\/s400\/Primary+Index.png\" alt=\"Teradata Primary Index\" width=\"400\" height=\"287\" border=\"0\" \/><\/a><\/div>\n<p>&nbsp;<\/p>\n<p><b>Hashing Process\u00a0\u00a0<\/b><\/p>\n<\/div>\n<div>1.The primary index value goes into the hashing algorithm.<br \/>\n2.The output of the hashing algorithm is the row hash value.<br \/>\n3.The hash map points to the specific AMP where the row resides.<br \/>\n4.The PE sends the request directly to the identified AMP.<br \/>\n5.The AMP locates the row(s) on its vdisk.<br \/>\n6.The data is sent over the BYNET to the PE, and the PE sends the answer set on to the client application.<b>Duplicate Row Hash Values\u00a0<\/b>It is possible for the hashing algorithm to end up with the same row hash value for two different rows.There are two ways this could happen:<\/p>\n<\/div>\n<div>\n<ul>\n<li>Duplicate NUPI values: If a Non-Unique Primary Index is used, duplicate NUPI values will produce the same row hash value.<\/li>\n<li>Hash synonym: Also called a hash collision, this occurs when the hashing algorithm calculates an identical row hash value for two different Primary Index values. H<\/li>\n<\/ul>\n<p>To differentiate each row in a table, every row is assigned a unique Row ID. The Row ID is the combination of the row hash value and a uniqueness value.<\/p>\n<p><b>Row ID = Row Hash Value + Uniqueness Value\u00a0<\/b><\/p>\n<p>The uniqueness value is used to differentiate between rows whose Primary Index values generate identical row hash values. In most cases, only the row hash value portion of the Row ID is needed to locate the row.<\/p>\n<div class=\"separator\"><a href=\"http:\/\/1.bp.blogspot.com\/-A-XWuwyMODk\/Ujs-DA1u5WI\/AAAAAAAAAfE\/s6PpbCwsVos\/s1600\/Teradata_Row_Id.png\"><img loading=\"lazy\" decoding=\"async\" title=\"TeradataWiki-Teradata Row Hash\" src=\"http:\/\/1.bp.blogspot.com\/-A-XWuwyMODk\/Ujs-DA1u5WI\/AAAAAAAAAfE\/s6PpbCwsVos\/s400\/Teradata_Row_Id.png\" alt=\"TeradataWiki-Teradata Row Hash\" width=\"400\" height=\"106\" border=\"0\" \/><\/a><\/div>\n<p>When each row is inserted, the AMP adds the row ID, stored as a prefix of the row.<br \/>\nThe first row inserted with a particular row hash value is assigned a uniqueness value of 1. The uniqueness value is incremented by 1 for any additional rows inserted with the same row hash value.<\/p>\n<p>Below Diagrams will show how data resides in AMP.<\/p>\n<p><b>Even Distribution with an UPI\u00a0<\/b><\/p>\n<div class=\"separator\"><a href=\"http:\/\/4.bp.blogspot.com\/-uTIsTiwid3s\/Ujs-bb6XtgI\/AAAAAAAAAfM\/0pxRZXXGUaE\/s1600\/UPI1.png\"><img loading=\"lazy\" decoding=\"async\" title=\"TeradataWiki-Teradata \" src=\"http:\/\/4.bp.blogspot.com\/-uTIsTiwid3s\/Ujs-bb6XtgI\/AAAAAAAAAfM\/0pxRZXXGUaE\/s320\/UPI1.png\" alt=\"TeradataWiki-Teradata \" width=\"320\" height=\"152\" border=\"0\" \/><\/a><\/div>\n<p><b>Uneven Distribution with a NUPI\u00a0<\/b><\/p>\n<div class=\"separator\"><a href=\"http:\/\/2.bp.blogspot.com\/-ue1gsJOEW0c\/Ujs-jH-bNjI\/AAAAAAAAAfU\/Ku6VzSDopUY\/s1600\/NUPI1.png\"><img loading=\"lazy\" decoding=\"async\" title=\"TeradataWiki-Teradata \" src=\"http:\/\/2.bp.blogspot.com\/-ue1gsJOEW0c\/Ujs-jH-bNjI\/AAAAAAAAAfU\/Ku6VzSDopUY\/s320\/NUPI1.png\" alt=\"TeradataWiki-Teradata \" width=\"320\" height=\"151\" border=\"0\" \/><\/a><\/div>\n<div><\/div>\n<\/div>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_1689\" class=\"pvc_stats all  \" data-element-id=\"1689\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/dbtut.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Every table must have\u00a0at least one column\u00a0as the Primary Index. The Primary Index is defined when the table is created.There are two reasons you might pick a different Primary Index then your Primary Key. They are (1) for Performance reasons and (2) known access paths. Primary Index Rules: Rule 1:\u00a0One Primary Index per table. &hellip;<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_1689\" class=\"pvc_stats all  \" data-element-id=\"1689\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/dbtut.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":132,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[1307],"tags":[],"class_list":["post-1689","post","type-post","status-publish","format-standard","","category-teradata"],"aioseo_notices":[],"a3_pvc":{"activated":true,"total_views":999,"today_views":0},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Primary index concept in Teradata - Database Tutorials<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/primary-index-concept-in-teradata\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Primary index concept in Teradata - Database Tutorials\" \/>\n<meta property=\"og:description\" content=\"&nbsp; Every table must have\u00a0at least one column\u00a0as the Primary Index. The Primary Index is defined when the table is created.There are two reasons you might pick a different Primary Index then your Primary Key. They are (1) for Performance reasons and (2) known access paths. Primary Index Rules: Rule 1:\u00a0One Primary Index per table. &hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/primary-index-concept-in-teradata\/\" \/>\n<meta property=\"og:site_name\" content=\"Database Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2018-08-14T11:44:30+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-11-09T23:05:39+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/4.bp.blogspot.com\/-hlqeBrrPVCU\/Ujs8feX3axI\/AAAAAAAAAeg\/yzPBqvCEvWs\/s320\/Unique+Primary+Index.png\" \/>\n<meta name=\"author\" content=\"Vijay Tumunuri\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Vijay Tumunuri\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/primary-index-concept-in-teradata\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/primary-index-concept-in-teradata\/\"},\"author\":{\"name\":\"Vijay Tumunuri\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/9393e9f99012d5f82aed289f0fc80ffc\"},\"headline\":\"Primary index concept in Teradata\",\"datePublished\":\"2018-08-14T11:44:30+00:00\",\"dateModified\":\"2018-11-09T23:05:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/primary-index-concept-in-teradata\/\"},\"wordCount\":804,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/primary-index-concept-in-teradata\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/4.bp.blogspot.com\/-hlqeBrrPVCU\/Ujs8feX3axI\/AAAAAAAAAeg\/yzPBqvCEvWs\/s320\/Unique+Primary+Index.png\",\"articleSection\":[\"TERADATA\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/primary-index-concept-in-teradata\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/primary-index-concept-in-teradata\/\",\"url\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/primary-index-concept-in-teradata\/\",\"name\":\"Primary index concept in Teradata - Database Tutorials\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/primary-index-concept-in-teradata\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/primary-index-concept-in-teradata\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/4.bp.blogspot.com\/-hlqeBrrPVCU\/Ujs8feX3axI\/AAAAAAAAAeg\/yzPBqvCEvWs\/s320\/Unique+Primary+Index.png\",\"datePublished\":\"2018-08-14T11:44:30+00:00\",\"dateModified\":\"2018-11-09T23:05:39+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/primary-index-concept-in-teradata\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/primary-index-concept-in-teradata\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/primary-index-concept-in-teradata\/#primaryimage\",\"url\":\"http:\/\/4.bp.blogspot.com\/-hlqeBrrPVCU\/Ujs8feX3axI\/AAAAAAAAAeg\/yzPBqvCEvWs\/s320\/Unique+Primary+Index.png\",\"contentUrl\":\"http:\/\/4.bp.blogspot.com\/-hlqeBrrPVCU\/Ujs8feX3axI\/AAAAAAAAAeg\/yzPBqvCEvWs\/s320\/Unique+Primary+Index.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/primary-index-concept-in-teradata\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/dbtut.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Primary index concept in Teradata\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/dbtut.com\/#website\",\"url\":\"https:\/\/dbtut.com\/\",\"name\":\"Database Tutorials\",\"description\":\"MSSQL, Oracle, PostgreSQL, MySQL, MariaDB, DB2, Sybase, Teradata, Big Data, NOSQL, MongoDB, Couchbase, Cassandra, Windows, Linux\",\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/dbtut.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/dbtut.com\/#organization\",\"name\":\"dbtut\",\"url\":\"https:\/\/dbtut.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg\",\"contentUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg\",\"width\":223,\"height\":36,\"caption\":\"dbtut\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/9393e9f99012d5f82aed289f0fc80ffc\",\"name\":\"Vijay Tumunuri\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c9c3b97b03cdf3a0fbdd9573b4dd17f60e4f0251c15493e6abc39adb798c0973?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c9c3b97b03cdf3a0fbdd9573b4dd17f60e4f0251c15493e6abc39adb798c0973?s=96&d=mm&r=g\",\"caption\":\"Vijay Tumunuri\"},\"description\":\"I am a Teradata certified Expert with 6 years of experience and has strong knowledge in Teradata Database architecture and Administration and expertise in troubleshooting user issues and problem analysis. And has hands-on experience in installation and configuration of Teradata database on Virtual Machines (TVME) and Public cloud such as Amazon Web Services (AWS).\",\"url\":\"https:\/\/dbtut.com\/index.php\/author\/vijaytumunuri\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Primary index concept in Teradata - Database Tutorials","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/primary-index-concept-in-teradata\/","og_locale":"en_US","og_type":"article","og_title":"Primary index concept in Teradata - Database Tutorials","og_description":"&nbsp; Every table must have\u00a0at least one column\u00a0as the Primary Index. The Primary Index is defined when the table is created.There are two reasons you might pick a different Primary Index then your Primary Key. They are (1) for Performance reasons and (2) known access paths. Primary Index Rules: Rule 1:\u00a0One Primary Index per table. &hellip;","og_url":"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/primary-index-concept-in-teradata\/","og_site_name":"Database Tutorials","article_published_time":"2018-08-14T11:44:30+00:00","article_modified_time":"2018-11-09T23:05:39+00:00","og_image":[{"url":"http:\/\/4.bp.blogspot.com\/-hlqeBrrPVCU\/Ujs8feX3axI\/AAAAAAAAAeg\/yzPBqvCEvWs\/s320\/Unique+Primary+Index.png","type":"","width":"","height":""}],"author":"Vijay Tumunuri","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Vijay Tumunuri","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/primary-index-concept-in-teradata\/#article","isPartOf":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/primary-index-concept-in-teradata\/"},"author":{"name":"Vijay Tumunuri","@id":"https:\/\/dbtut.com\/#\/schema\/person\/9393e9f99012d5f82aed289f0fc80ffc"},"headline":"Primary index concept in Teradata","datePublished":"2018-08-14T11:44:30+00:00","dateModified":"2018-11-09T23:05:39+00:00","mainEntityOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/primary-index-concept-in-teradata\/"},"wordCount":804,"commentCount":0,"publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"image":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/primary-index-concept-in-teradata\/#primaryimage"},"thumbnailUrl":"http:\/\/4.bp.blogspot.com\/-hlqeBrrPVCU\/Ujs8feX3axI\/AAAAAAAAAeg\/yzPBqvCEvWs\/s320\/Unique+Primary+Index.png","articleSection":["TERADATA"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/dbtut.com\/index.php\/2018\/08\/14\/primary-index-concept-in-teradata\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/primary-index-concept-in-teradata\/","url":"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/primary-index-concept-in-teradata\/","name":"Primary index concept in Teradata - Database Tutorials","isPartOf":{"@id":"https:\/\/dbtut.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/primary-index-concept-in-teradata\/#primaryimage"},"image":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/primary-index-concept-in-teradata\/#primaryimage"},"thumbnailUrl":"http:\/\/4.bp.blogspot.com\/-hlqeBrrPVCU\/Ujs8feX3axI\/AAAAAAAAAeg\/yzPBqvCEvWs\/s320\/Unique+Primary+Index.png","datePublished":"2018-08-14T11:44:30+00:00","dateModified":"2018-11-09T23:05:39+00:00","breadcrumb":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/primary-index-concept-in-teradata\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dbtut.com\/index.php\/2018\/08\/14\/primary-index-concept-in-teradata\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/primary-index-concept-in-teradata\/#primaryimage","url":"http:\/\/4.bp.blogspot.com\/-hlqeBrrPVCU\/Ujs8feX3axI\/AAAAAAAAAeg\/yzPBqvCEvWs\/s320\/Unique+Primary+Index.png","contentUrl":"http:\/\/4.bp.blogspot.com\/-hlqeBrrPVCU\/Ujs8feX3axI\/AAAAAAAAAeg\/yzPBqvCEvWs\/s320\/Unique+Primary+Index.png"},{"@type":"BreadcrumbList","@id":"https:\/\/dbtut.com\/index.php\/2018\/08\/14\/primary-index-concept-in-teradata\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dbtut.com\/"},{"@type":"ListItem","position":2,"name":"Primary index concept in Teradata"}]},{"@type":"WebSite","@id":"https:\/\/dbtut.com\/#website","url":"https:\/\/dbtut.com\/","name":"Database Tutorials","description":"MSSQL, Oracle, PostgreSQL, MySQL, MariaDB, DB2, Sybase, Teradata, Big Data, NOSQL, MongoDB, Couchbase, Cassandra, Windows, Linux","publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dbtut.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/dbtut.com\/#organization","name":"dbtut","url":"https:\/\/dbtut.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/logo\/image\/","url":"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg","contentUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg","width":223,"height":36,"caption":"dbtut"},"image":{"@id":"https:\/\/dbtut.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/dbtut.com\/#\/schema\/person\/9393e9f99012d5f82aed289f0fc80ffc","name":"Vijay Tumunuri","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c9c3b97b03cdf3a0fbdd9573b4dd17f60e4f0251c15493e6abc39adb798c0973?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c9c3b97b03cdf3a0fbdd9573b4dd17f60e4f0251c15493e6abc39adb798c0973?s=96&d=mm&r=g","caption":"Vijay Tumunuri"},"description":"I am a Teradata certified Expert with 6 years of experience and has strong knowledge in Teradata Database architecture and Administration and expertise in troubleshooting user issues and problem analysis. And has hands-on experience in installation and configuration of Teradata database on Virtual Machines (TVME) and Public cloud such as Amazon Web Services (AWS).","url":"https:\/\/dbtut.com\/index.php\/author\/vijaytumunuri\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/1689","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/users\/132"}],"replies":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/comments?post=1689"}],"version-history":[{"count":0,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/1689\/revisions"}],"wp:attachment":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/media?parent=1689"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/categories?post=1689"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/tags?post=1689"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}