mysql裡alter table 重定義主鍵的步驟:
Processing CREATE INDEXConsider an example. If you use the ALTER TABLE command to
redefine the primary key of table T (or otherwise cause the clustered index to be recreated, for example by compressing an uncompressed table),
the InnoDB Plugin will perform the following sequence of steps:
Lock table T in exclusive mode.
Create a new temporary table T1, with the new index structure.
Copy data from table T to temporary table T1.
Rename the original table T to temporary table T2.
Rename table T1 (the new table) to T (the original table name).
Drop table T2 (the original table, with the old index structure).
[@more@]
redefine the primary key of table T (or otherwise cause the clustered index to be recreated, for example by compressing an uncompressed table),
the InnoDB Plugin will perform the following sequence of steps:
Lock table T in exclusive mode.
Create a new temporary table T1, with the new index structure.
Copy data from table T to temporary table T1.
Rename the original table T to temporary table T2.
Rename table T1 (the new table) to T (the original table name).
Drop table T2 (the original table, with the old index structure).
[@more@]
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7916042/viewspace-1058344/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle線上重定義表步驟Oracle
- mysql的ALTER TABLE命令MySql
- mysql主主複製(雙主複製)配置步驟MySql
- Vue element-ui 裡面的table匯出excel表格 步驟VueUIExcel
- alter table move 和 alter table shrink space的區別
- 【TABLE】oracle表線上重定義注意事項Oracle
- mysql 主從複製搭建詳細步驟MySql
- 使用XtraBackup搭建mysql主從複製的操作步驟MySql
- 線上重定義的操作步驟__普通錶轉換為分割槽表的實驗案例
- 【REDEFINITION】使用線上重定義dbms_redefinition完成主鍵列型別的調整型別
- Alter table for ORACLEOracle
- 【MySQL】MySQL Replication 一主一備搭建步驟(GTID方式)MySql
- 【MySQL】MySQL Replication 一主一備搭建步驟(傳統方式)MySql
- SQL Server 遷移至MySQL 關鍵步驟的梳理總結ServerMySql
- 部署MySQL步驟MySql
- 主備都是全新的恢復,主主搭建步驟
- MySQL主鍵的理解MySql
- MySQL oak-online-alter-table工具使用初探MySql
- mysql 5.7+keepalived主從切換步驟簡述MySql
- Angular 裡使用 FormControl 的步驟AngularORM
- Angular 裡使用巢狀 Form 的步驟Angular巢狀ORM
- 修改linux主機名的步驟Linux
- oracle alter table詳解Oracle
- alter table using indexIndex
- Swift 裡的巨集定義Swift
- 安裝aix rac的關鍵步驟AI
- mysql忽略主鍵衝突、避免重複插入的幾種方式MySql
- mysql 忽略主鍵衝突、避免重複插入的幾種方式MySql
- 開啟win7鍵盤滑鼠鍵的步驟Win7
- MySQL-ALTER TABLE命令學習[20180503]MySql
- MySQL的安裝步驟(詳細)MySql
- MySQL 處理插入過程中的主鍵唯一鍵重複值辦法MySql
- Redhat Linux兩臺主機之間設定NFS掛載的步驟RedhatLinuxNFS
- DataGuard主備庫切換步驟
- solaris 主機修改主機名 ip地址 步驟
- MySQL中的alter table命令的基本使用方法及提速最佳化MySql
- win10電腦防火牆在哪裡設定 win10設定防火牆的步驟Win10防火牆
- v$lock之alter table drop column與alter table set unused column區別系列五