To avoid having to "warm-up" the new table, are the old indexes kept around?
When using the pt-online-schema-change tool, can the indexes of the original table be preserved?
383 Views Asked by Leo Romanovsky At
1
There are 1 best solutions below
Related Questions in MYSQL
- MySQL Select Rank
- When dealing with databases, does adding a different table when we can use a simple hash a good thing?
- Push mysql database script to server using git
- Why does mysql stop using indexes when date ranges are added to the query?
- Google Maps API Re-size
- store numpy array in mysql
- Whats wrong with this query? Using ands
- MySQL-Auto increment
- show duplicate values subquery mysql
- Java Web Application Query Is Not Working
- microsoft odbc driver manager data source name not found and no default driver specified
- Setting foreign key in phpMyAdmin
- No responses from google places text search api
- Adding to MAMP database in SQL/PHP
- I want to remove certain parent- and child-divs in all my wordpress posts with php or some other script
Related Questions in DATABASE-MIGRATION
- Database Migration Approach
- PostgreSQL migration and restore
- Oracle to SQL Server Migration issue - On delete cascade
- Entitiy Framework migration with EF in multiple projects
- Alembic SQLite ALTER TABLE with self-referencing foreign key
- Migrate multiple databases with Propel
- Django migration having no effect, on postgres table
- Running migrations with Rails in a Docker container with multiple container instances
- How to take data from one model field to another in Django using fixture?
- Stale content type prompt deleting all model instances after renaming django model with permissions
- Django migrations missing way to declare "needed_by"?
- Entity Framework: Automatic migration failed on huge DB
- what is database baseline version in flywaydb. Can I use it for migrating from a specific version and up?
- Sybase to Teradata inquiry LIKE '[0-9]'
- Copying (Cloning) DB to another Vertica Cluster with Different no. of Nodes and Different IP Addresses
Related Questions in PERCONA
- Why didn't MySQL GRANT create associated user accounts?
- percona replication -slave does not follow the master
- Would the following primary key change work with `pt-online-schema-change`?
- Quartz scheduler with percona db cluster giving deadlock errors
- HAProxy load balancing
- Broken MySQL GTID replication (malaligned GTIDs)
- InnoDb update deadlock
- tokudb insert speed with binlog on way slower than innodb?
- Can't install mysql gem on Percona-XtraDB-Cluster
- MySQL slow query log contains empty statements
- how to execute innobackupex to be executed inside screen to transfer the data over the nc
- pt-table-sync unable to modify binlog_format
- Percona XtraDB Cluster with HandlerSocket
- When using the pt-online-schema-change tool, can the indexes of the original table be preserved?
- pt-table-checksum not detecting diffs
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Yes, all indexes are included in the definition of the new table.
This is easy to test:
Then try to change the table with pt-online-schema-change:
Now inspect the table to make sure it still has the indexes it started with:
However, your question mentions "warm-up" which is a phrase often associated with having pages from the table in the buffer pool. As the ALTER makes changes to pages, they must be in the buffer pool on their way to the disk. So by the end of the ALTER, you do have a lot of the pages in the buffer pool.
You can test this with the new INFORMATION_SCHEMA tables for InnoDB metrics that are present in MySQL 5.5 and 5.6:
But in cases when the table is larger than the capacity of the buffer pool, you end up with a subset of pages, and whether this subset is optimal for a warmed-up buffer pool for that table is not guaranteed.
The same thing happens when you use pt-online-schema-change. The tablespace id changes, but there are a lot of pages in the buffer pool following an alter.