{"id":235,"date":"2018-06-10T23:20:22","date_gmt":"2018-06-10T23:20:22","guid":{"rendered":"http:\/\/dbtut.com\/?p=235"},"modified":"2019-04-01T13:52:12","modified_gmt":"2019-04-01T13:52:12","slug":"differences-between-clustered-index-and-non-clustered-index","status":"publish","type":"post","link":"https:\/\/dbtut.com\/index.php\/2018\/06\/10\/differences-between-clustered-index-and-non-clustered-index\/","title":{"rendered":"Differences Between Clustered Index and Non Clustered Index"},"content":{"rendered":"<p>To better understand this article, I would first recommend reading the &#8220;<a href=\"http:\/\/dbtut.com\/index.php\/2018\/06\/12\/index-concept-and-performance-effect-on-sql-server\/\" target=\"_blank\" rel=\"noopener noreferrer\">Index Concept and Performance Effect on SQL Server<\/a>&#8221; and &#8220;<a href=\"http:\/\/dbtut.com\/index.php\/2018\/06\/13\/statistic-concept-and-performance-effect-on-sql-server\/\" target=\"_blank\" rel=\"noopener noreferrer\">Statistics Concept and Performance Effect on SQL Server<\/a>&#8221; articles.<\/p>\n<p>In these two articles, the concepts of Index and statistics are explained in detail.<\/p>\n<h2>Differences Between Clustered Index and Non Clustered Index<\/h2>\n<div style=\"direction: ltr;\">\n<table class=\"responsive-table\">\n<tbody>\n<tr>\n<td style=\"width: 278.4px;\"><strong>Clustered Index<\/strong><\/td>\n<td style=\"width: 404px;\"><strong>Non Clustered Index<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 278.4px;\"><img decoding=\"async\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/910.png\" \/><\/td>\n<td style=\"width: 404px;\"><img decoding=\"async\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/908.png\" \/><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 278.4px;\">\n<p lang=\"en-US\">The data (table) is stored logically ordered according to the clustered index on the disk.<\/p>\n<\/td>\n<td style=\"width: 404px;\">Non-clustered indexes are stored separately on the disk independently of the table.So, there you need extra disk space. If there are too many nonclustered indexes in the table, insert, update and delete performance will slow down because each insert, update and delete operation will be applied to all nonclustered indexes in this table.<\/p>\n<p>So it is not always a good thing to create too many nonclustered indexes.<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 278.4px;\">While we select the data, when we reach the Leaf Level of the index, we reach the data. To understand Leaf Level concept -&gt; &#8220;<a href=\"https:\/\/dbtut.com\/index.php\/2018\/06\/12\/index-concept-and-performance-effect-on-sql-server\/\" target=\"_blank\" rel=\"noopener noreferrer\">Index Concept and Performance Effect On SQL Server<\/a>&#8220;<\/td>\n<td style=\"width: 404px;\">While we select the data, when we reach the Leaf Level of the non clustered index, we reach the Row Locator instead of the data.If the table is heap, there is Row ID (RID) as row locator in the Leaf Level. This RID used to reach the requested data set. This process is called as <strong>RID Lookup<\/strong>. It&#8217;s not a good thing. Be sure to create a clustered index on your table.<\/p>\n<p>If the table is not heap, there is Clustered Index Key as row locator in the Leaf Level. This Clustered Index Key used to reach the requested data set. This process is called <strong>Key Lookup<\/strong>.<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 278.4px;\"><span lang=\"en-US\">A table can have one <\/span><span lang=\"tr\">clustered index<\/span><span lang=\"en-US\">(because the whole table is stored logically ordered in the disk according to the clustered index, the table can only be stored ordered by one clustered index).<\/span><\/td>\n<td style=\"width: 404px;\">The table is not sorted by nonclustered index, and the nonclustered index is stored separate from the table. Therefore, a table can have more than one non clustered index.<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 278.4px;\">You can not add included column to the clustered index. Because there is the data itself in the Leaf Level.<\/td>\n<td style=\"width: 404px;\"><span lang=\"en-US\">You can add Included Col<\/span><span lang=\"tr\">um<\/span><span lang=\"en-US\">n<\/span><span lang=\"tr\"> to the non clustered index<\/span><span lang=\"en-US\">. I have explained the included column in detail in the article &#8220;<a href=\"http:\/\/dbtut.com\/index.php\/2018\/06\/12\/index-concept-and-performance-effect-on-sql-server\/\" target=\"_blank\" rel=\"noopener noreferrer\">Index Concept in SQL Server and Performance Impact<\/a>&#8220;<\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 278.4px;\">It can be Unique or non-unique. If it is non-unique (which I do not recommend), sql server put a 4-byte identifier named uniqueifier to make the clustered index keys unique. This ensures that a query using a nonclustered index finds the data that it needs. Extra cost, extra size.<\/td>\n<td style=\"width: 404px;\">It can be unique or non unique.If it is unique, queries will return faster results. For example, we have 100 records in our table. You will create an index and 100 of the 100 records in the column are different from each other. If you search for one, you can find it directly. This process is called index seek.<\/p>\n<p>But if the values \u200b\u200bof 70 of the 100 records in the column are the same as each other, all of the records in this index will be scan and then you can find what you need. This process is called index scan. It looks bad, but in some cases it is better than scanning the entire table. (Table scan)<\/p>\n<p>So, if its possible, use unique columns for creating indexes.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h1 lang=\"en-US\">Conclusion<\/h1>\n<p lang=\"en-US\">Clearly, Clustered Index and Non-Clustered Index are not alternative index types.<\/p>\n<p lang=\"en-US\">A table must have a clustered index. If there is no clustered index, the table will be scattered on the disk.<\/p>\n<p lang=\"en-US\">You can create non clustered index for searching another column except the clustered index column on a table that has a clustered index.<\/p>\n<p lang=\"en-US\">In addition, you may need to use a primary key foreign key because you are using a relational database.<\/p>\n<p lang=\"en-US\">If you create a primary key on the table, sql server automatically create a clustered index on the column where you create the primary key.<\/p>\n<p lang=\"en-US\">Even if SQL Server creates a clustered index by default, you can force the primary key column to be nonclustered.<\/p>\n<p>For primary key and foreign key concepts, you can read the following articles.<\/p>\n<p>&#8220;<a href=\"http:\/\/dbtut.com\/index.php\/2018\/06\/14\/what-is-primary-key-and-foreign-key\/\" target=\"_blank\" rel=\"noopener noreferrer\">What is Primary Key and Foreign Key<\/a>&#8220;,<\/p>\n<p>&#8220;<a href=\"http:\/\/dbtut.com\/index.php\/2018\/06\/16\/differences-between-primary-key-and-unique-constraint\/\" target=\"_blank\" rel=\"noopener noreferrer\">Differences Between Primary Key and Unique Constraint<\/a>&#8221;<\/p>\n\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_235\" class=\"pvc_stats all  \" data-element-id=\"235\" 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>To better understand this article, I would first recommend reading the &#8220;Index Concept and Performance Effect on SQL Server&#8221; and &#8220;Statistics Concept and Performance Effect on SQL Server&#8221; articles. In these two articles, the concepts of Index and statistics are explained in detail. Differences Between Clustered Index and Non Clustered Index Clustered Index Non Clustered &hellip;<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_235\" class=\"pvc_stats all  \" data-element-id=\"235\" 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":1,"featured_media":11256,"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":[3],"tags":[3018,3015,3019,3024,173,3004,3026,3017,191,182,183,3023,3010,3006,3009,171,188,187,3013,3022,3014,175,178,177,174,185,190,181,180,179,3025,3020,172,176,186,189,192,184,3016,3007,3012,3005,3008,3011,3021],"class_list":["post-235","post","type-post","status-publish","format-standard","has-post-thumbnail","","category-mssql","tag-can-a-primary-key-be-non-clustered","tag-can-a-table-have-both-clustered-and-nonclustered-index","tag-can-we-create-primary-key-without-clustered-index","tag-can-we-have-two-clustered-index-on-a-table","tag-clustered-index","tag-clustered-vs-nonclustered-index","tag-difference-between-clustered-index-and-non-clustered-index","tag-do-clustered-indexes-have-to-be-unique","tag-foreing-key","tag-heap","tag-heap-table","tag-how-are-clustered-indexes-stored","tag-how-does-clustered-and-nonclustered-index-work","tag-how-indexes-work-difference-between-clustered-non-clustered","tag-how-many-clustered-and-nonclustered-index-can-be-applied-to-a-table","tag-index","tag-index-scan","tag-index-seek","tag-is-a-primary-key-a-clustered-index","tag-is-clustered-index-faster-than-nonclustered","tag-is-primary-key-always-clustered-index","tag-key-lookup","tag-leaf-level","tag-non-clustered-index","tag-nonclustered-index","tag-nonunique-index","tag-primary-key","tag-rid","tag-rid-lookup","tag-row-locator","tag-should-every-table-have-a-clustered-index","tag-should-primary-key-be-clustered","tag-statistic","tag-table","tag-table-scan","tag-unique-column","tag-unique-constraint","tag-unique-index","tag-what-is-clustered-and-non-clustered-index","tag-what-is-the-difference-between-clustered-index-and-non-clustered-index","tag-whats-the-difference-between-a-primary-key-and-a-clustered-index","tag-when-to-use-non-clustered-index","tag-which-is-better-clustered-or-nonclustered-index","tag-why-do-we-need-non-clustered-index","tag-why-only-one-clustered-index-can-be-created-on-a-table"],"aioseo_notices":[],"a3_pvc":{"activated":true,"total_views":727,"today_views":0},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Differences Between Clustered Index and Non Clustered Index - Database Tutorials<\/title>\n<meta name=\"description\" content=\"Difference Between Clustered Index and Non Clustered Index\" \/>\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\/06\/10\/differences-between-clustered-index-and-non-clustered-index\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Differences Between Clustered Index and Non Clustered Index - Database Tutorials\" \/>\n<meta property=\"og:description\" content=\"Difference Between Clustered Index and Non Clustered Index\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dbtut.com\/index.php\/2018\/06\/10\/differences-between-clustered-index-and-non-clustered-index\/\" \/>\n<meta property=\"og:site_name\" content=\"Database Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2018-06-10T23:20:22+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-04-01T13:52:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-22.png\" \/>\n\t<meta property=\"og:image:width\" content=\"557\" \/>\n\t<meta property=\"og:image:height\" content=\"329\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"dbtut\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"dbtut\" \/>\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\/06\/10\/differences-between-clustered-index-and-non-clustered-index\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/10\/differences-between-clustered-index-and-non-clustered-index\/\"},\"author\":{\"name\":\"dbtut\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/fc047c39e1e53dce28fc4253529ea408\"},\"headline\":\"Differences Between Clustered Index and Non Clustered Index\",\"datePublished\":\"2018-06-10T23:20:22+00:00\",\"dateModified\":\"2019-04-01T13:52:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/10\/differences-between-clustered-index-and-non-clustered-index\/\"},\"wordCount\":726,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/10\/differences-between-clustered-index-and-non-clustered-index\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-22.png\",\"keywords\":[\"Can a primary key be non clustered?\",\"Can a table have both clustered and nonclustered index?\",\"Can we create primary key without clustered index?\",\"Can we have two clustered index on a table?\",\"clustered index\",\"clustered vs nonclustered index\",\"difference between clustered index and non clustered index\",\"Do clustered indexes have to be unique?\",\"foreing key\",\"heap\",\"heap table\",\"How are clustered indexes stored?\",\"How does clustered and nonclustered index work?\",\"how indexes work difference between clustered non clustered\",\"How many clustered and nonclustered index can be applied to a table?\",\"Index\",\"index scan\",\"index seek\",\"Is a primary key a clustered index?\",\"Is clustered index faster than nonclustered?\",\"Is primary key always clustered index?\",\"key lookup\",\"Leaf Level\",\"Non-clustered index\",\"nonclustered index\",\"nonunique index\",\"primary key\",\"RID\",\"RID Lookup\",\"Row Locator\",\"Should every table have a clustered index?\",\"Should primary key be clustered?\",\"Statistic\",\"table\",\"table scan\",\"unique column\",\"unique constraint\",\"unique index\",\"What is clustered and non clustered index?\",\"What is the difference between clustered index and non clustered index?\",\"What's the difference between a primary key and a clustered index?\",\"when to use non clustered index\",\"Which is better clustered or nonclustered index?\",\"Why do we need non clustered index?\",\"Why only one clustered index can be created on a table?\"],\"articleSection\":[\"MSSQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2018\/06\/10\/differences-between-clustered-index-and-non-clustered-index\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/10\/differences-between-clustered-index-and-non-clustered-index\/\",\"url\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/10\/differences-between-clustered-index-and-non-clustered-index\/\",\"name\":\"Differences Between Clustered Index and Non Clustered Index - Database Tutorials\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/10\/differences-between-clustered-index-and-non-clustered-index\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/10\/differences-between-clustered-index-and-non-clustered-index\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-22.png\",\"datePublished\":\"2018-06-10T23:20:22+00:00\",\"dateModified\":\"2019-04-01T13:52:12+00:00\",\"description\":\"Difference Between Clustered Index and Non Clustered Index\",\"breadcrumb\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/10\/differences-between-clustered-index-and-non-clustered-index\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2018\/06\/10\/differences-between-clustered-index-and-non-clustered-index\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/10\/differences-between-clustered-index-and-non-clustered-index\/#primaryimage\",\"url\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-22.png\",\"contentUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-22.png\",\"width\":557,\"height\":329},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/10\/differences-between-clustered-index-and-non-clustered-index\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/dbtut.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Differences Between Clustered Index and Non Clustered Index\"}]},{\"@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\/fc047c39e1e53dce28fc4253529ea408\",\"name\":\"dbtut\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c322c32021bf651d9e103b183963c479a9c9791ead0715f4348203496c39aa54?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c322c32021bf651d9e103b183963c479a9c9791ead0715f4348203496c39aa54?s=96&d=mm&r=g\",\"caption\":\"dbtut\"},\"description\":\"We are a team with over 10 years of database management and BI experience. Our Expertises: Oracle, SQL Server, PostgreSQL, MySQL, MongoDB, Elasticsearch, Kibana, Grafana.\",\"sameAs\":[\"http:\/\/NurullahCAKIR\"],\"url\":\"https:\/\/dbtut.com\/index.php\/author\/dbtut\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Differences Between Clustered Index and Non Clustered Index - Database Tutorials","description":"Difference Between Clustered Index and Non Clustered Index","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\/06\/10\/differences-between-clustered-index-and-non-clustered-index\/","og_locale":"en_US","og_type":"article","og_title":"Differences Between Clustered Index and Non Clustered Index - Database Tutorials","og_description":"Difference Between Clustered Index and Non Clustered Index","og_url":"https:\/\/dbtut.com\/index.php\/2018\/06\/10\/differences-between-clustered-index-and-non-clustered-index\/","og_site_name":"Database Tutorials","article_published_time":"2018-06-10T23:20:22+00:00","article_modified_time":"2019-04-01T13:52:12+00:00","og_image":[{"width":557,"height":329,"url":"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-22.png","type":"image\/png"}],"author":"dbtut","twitter_card":"summary_large_image","twitter_misc":{"Written by":"dbtut","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/10\/differences-between-clustered-index-and-non-clustered-index\/#article","isPartOf":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/10\/differences-between-clustered-index-and-non-clustered-index\/"},"author":{"name":"dbtut","@id":"https:\/\/dbtut.com\/#\/schema\/person\/fc047c39e1e53dce28fc4253529ea408"},"headline":"Differences Between Clustered Index and Non Clustered Index","datePublished":"2018-06-10T23:20:22+00:00","dateModified":"2019-04-01T13:52:12+00:00","mainEntityOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/10\/differences-between-clustered-index-and-non-clustered-index\/"},"wordCount":726,"commentCount":2,"publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"image":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/10\/differences-between-clustered-index-and-non-clustered-index\/#primaryimage"},"thumbnailUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-22.png","keywords":["Can a primary key be non clustered?","Can a table have both clustered and nonclustered index?","Can we create primary key without clustered index?","Can we have two clustered index on a table?","clustered index","clustered vs nonclustered index","difference between clustered index and non clustered index","Do clustered indexes have to be unique?","foreing key","heap","heap table","How are clustered indexes stored?","How does clustered and nonclustered index work?","how indexes work difference between clustered non clustered","How many clustered and nonclustered index can be applied to a table?","Index","index scan","index seek","Is a primary key a clustered index?","Is clustered index faster than nonclustered?","Is primary key always clustered index?","key lookup","Leaf Level","Non-clustered index","nonclustered index","nonunique index","primary key","RID","RID Lookup","Row Locator","Should every table have a clustered index?","Should primary key be clustered?","Statistic","table","table scan","unique column","unique constraint","unique index","What is clustered and non clustered index?","What is the difference between clustered index and non clustered index?","What's the difference between a primary key and a clustered index?","when to use non clustered index","Which is better clustered or nonclustered index?","Why do we need non clustered index?","Why only one clustered index can be created on a table?"],"articleSection":["MSSQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/dbtut.com\/index.php\/2018\/06\/10\/differences-between-clustered-index-and-non-clustered-index\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/10\/differences-between-clustered-index-and-non-clustered-index\/","url":"https:\/\/dbtut.com\/index.php\/2018\/06\/10\/differences-between-clustered-index-and-non-clustered-index\/","name":"Differences Between Clustered Index and Non Clustered Index - Database Tutorials","isPartOf":{"@id":"https:\/\/dbtut.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/10\/differences-between-clustered-index-and-non-clustered-index\/#primaryimage"},"image":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/10\/differences-between-clustered-index-and-non-clustered-index\/#primaryimage"},"thumbnailUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-22.png","datePublished":"2018-06-10T23:20:22+00:00","dateModified":"2019-04-01T13:52:12+00:00","description":"Difference Between Clustered Index and Non Clustered Index","breadcrumb":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/10\/differences-between-clustered-index-and-non-clustered-index\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dbtut.com\/index.php\/2018\/06\/10\/differences-between-clustered-index-and-non-clustered-index\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/10\/differences-between-clustered-index-and-non-clustered-index\/#primaryimage","url":"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-22.png","contentUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-22.png","width":557,"height":329},{"@type":"BreadcrumbList","@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/10\/differences-between-clustered-index-and-non-clustered-index\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dbtut.com\/"},{"@type":"ListItem","position":2,"name":"Differences Between Clustered Index and Non Clustered Index"}]},{"@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\/fc047c39e1e53dce28fc4253529ea408","name":"dbtut","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c322c32021bf651d9e103b183963c479a9c9791ead0715f4348203496c39aa54?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c322c32021bf651d9e103b183963c479a9c9791ead0715f4348203496c39aa54?s=96&d=mm&r=g","caption":"dbtut"},"description":"We are a team with over 10 years of database management and BI experience. Our Expertises: Oracle, SQL Server, PostgreSQL, MySQL, MongoDB, Elasticsearch, Kibana, Grafana.","sameAs":["http:\/\/NurullahCAKIR"],"url":"https:\/\/dbtut.com\/index.php\/author\/dbtut\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/235","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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/comments?post=235"}],"version-history":[{"count":0,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/235\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/media\/11256"}],"wp:attachment":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/media?parent=235"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/categories?post=235"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/tags?post=235"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}