Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Rename Index / Alter Index Name

forums forums SQLyog Using SQLyog Rename Index / Alter Index Name

  • This topic is empty.
Viewing 2 reply threads
  • Author
    Posts
    • #10572
      nicolas79
      Member

      The documentation says: “Index Name: The Index Name is displayed. You cannot alter the Index Name.”

      Why can the Index Name not be changed?

      Is there a way to rename an Index?

    • #25062
      peterlaursen
      Participant

      What is the documentation you are referring to?

      MySQL docs? If so please link to the page

      SQLyog help file? If so what is the page header?

      To alter an index, you will have to execute SQL “ALTER TABLE”. Every change in an index will drop the existing index and build a new one from scratch. Ther is no SQL like ALTER INDEX ..

      You can try to “manage indexes .. edit” and see the SQL form HISTORY like

      Code:
      alter table … drop key `t`, add index `t` (`t`, `id`)

      of course we could allow for renaming and the SQL would be like

      Code:
      alter table … drop key `t`, add index `t_new` (`t`)

      Do you request this? However you should be PERFECTLY aware that the old index will have to be dropped and a new will be built with ANY index change. What may take a lot of time with large tables. That probably also is why we did not support renaming an index (this was designed like that before my time!)

    • #25063
      nicolas79
      Member
      peterlaursen wrote on Oct 8 2007, 01:26 PM:
      What is the documentation you are referring to?

      MySQL docs? If so please link to the page

      SQLyog help file? If so what is the page header?

      Hi, thank you for the answer. This helps alot.

      I found this statement it in the SQLyog help file. The page header is “Alter Index”

      regards

      Nicolas

Viewing 2 reply threads
  • You must be logged in to reply to this topic.