{"id":240,"date":"2021-11-18T09:26:54","date_gmt":"2021-11-18T09:26:54","guid":{"rendered":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/?p=240"},"modified":"2021-11-18T09:26:54","modified_gmt":"2021-11-18T09:26:54","slug":"using-create-index","status":"publish","type":"post","link":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/2021\/11\/18\/using-create-index\/","title":{"rendered":"Using CREATE INDEX"},"content":{"rendered":"\n<p>An alternative to using ALTER TABLE to add an index is to use the CREATE INDEX command.<br>They are equivalent, except that CREATE INDEX cannot be used for creating a PRIMARY KEY<\/p>\n\n\n\n<p>These two commands are equivalent:<br><strong>ALTER TABLE classics ADD INDEX(author(20));<br>CREATE INDEX author ON classics (author(20));<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>An alternative to using ALTER TABLE to add an index is to use the CREATE INDEX command.They are equivalent, except that CREATE INDEX cannot be used for creating a PRIMARY KEY These two commands are equivalent:ALTER TABLE classics ADD INDEX(author(20));CREATE INDEX author ON classics (author(20));<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/240"}],"collection":[{"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=240"}],"version-history":[{"count":1,"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/240\/revisions"}],"predecessor-version":[{"id":241,"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/240\/revisions\/241"}],"wp:attachment":[{"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=240"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=240"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/tietokanta.dy.fi:8243\/mikko\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=240"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}