{"id":1958,"date":"2015-02-27T05:24:43","date_gmt":"2015-02-27T05:24:43","guid":{"rendered":"https:\/\/qbytes.cloud\/?p=1958"},"modified":"2015-02-27T05:24:43","modified_gmt":"2015-02-27T05:24:43","slug":"add-an-index-to-a-mysql-table","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2015\/02\/27\/add-an-index-to-a-mysql-table\/","title":{"rendered":"Add an index to a mysql table"},"content":{"rendered":"<p>Create an index to a mysql table. Say there is a product_id column:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nCREATE UNIQUE INDEX product_id\non table_name (product_id);\n<\/pre>\n<p>Add to existing table<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nmysql&gt; alter table tablename add index product_id on product_id;\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Create an index to a mysql table. Say there is a product_id column: CREATE UNIQUE INDEX product_id on table_name (product_id); Add to existing table mysql&gt; alter table tablename add index product_id on product_id;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[70],"tags":[],"class_list":["post-1958","post","type-post","status-publish","format-standard","hentry","category-mysql"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/1958","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/comments?post=1958"}],"version-history":[{"count":0,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/1958\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=1958"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=1958"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=1958"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}