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?
387 Views Asked by Leo Romanovsky At
1
There are 1 best solutions below
Related Questions in MYSQL
- How to Retrieve Data from an MySQL Database and Display it in a GUI?
- How to change woocomerce or full wordpress currency with value from USD to AUD
- window.location.href redirects but is causing problems on the webpage
- Error: local variable 'bramka' referenced before assignment
- Products aren't displayed after fetching data from mysql db (node.js & express)
- status table for all entries (even in different dates) in database changing value when all checkboxes are checked
- Can't Fix Mariadb & Mysql ERROR 2002 (HY000): Can't connect to local server through socket '/tmp/mysql.sock' (2) On MacOs
- Express Mysql getting max ID from table not working cought in a promise
- failed to upload a table from sql file
- Update a MySQL row depending on the ID in Google Sheets Apps Script
- Use row values from another table to select them as columns and establish relations between them (pivot table)
- SQL: Generate combination table based on source and destination column from same table
- How to display the column names which have only unique non-null values in MySQL table?
- mysql query takes too long because of wrong indexes usage
- Multitable joining in Sql
Related Questions in DATABASE-MIGRATION
- Django migrations not creating tables on PostgreSQL despite successful execution
- How to specify a float/decimal value for a column inside an insert in liquibase changelog?
- Run the migration script in the container
- Is it possible to downgrade an Entity Framework Core code-first migration without the migration present in the code base?
- ASP.NET Core SQL Server connection - migrations
- Couldn't find driver exception when running php artisan migrate
- SQL Database in production migration - Best approach
- How to setup Flyway migrations for multiple schemas
- mysql to postgres query convertion - COLUMNS.COLUMN_TYPE and information_schema.SEQ_IN_INDEX
- golang-migrate command "freezes" during migrations, takes too much time to migrate (10 minutes for 10 rows)
- Performance Issues After Migrating from MariaDB 10.3.39 to 10.6.16 Due to Changes in Query Execution Plan
- How to generate migration scripts in EF6 with custom SQL?
- Unable to create a 'DbContext' of type ''. The exception 'Unable to resolve service for type 'Microsoft.EntityFrameworkCore.DbContextOptions`1[Comm
- node-pg-migrate not able to run migrations from config defined with .env variables
- django.db.utils.ProgrammingError: column app_table.field does not exist
Related Questions in PERCONA
- mysqlcheck or check mysql table without marking the table as corrupted
- Error during installation Prestashop using Percona 5.7
- How to isolate duplicate subvalues of a group by SQL statement
- Waiting for restore metadata - Percona Operator for MongoDb
- Percona Pmm helm upgrade failed: error converting YAML to JSON: yaml: line 14: did not find expected key
- pt-show-grant and root password protection
- Percona xtrabackup bypass xbcloud locally
- Percona XtraDB Cluster: Automatic Failover Between Nodes in Java Spring Boot Application
- Can ProxySQL auto failover in a Galera cluster?
- Mongodb ConnectionPoolExpired between it’s replica members
- MySQL errno: 24 - Too many open files
- MongoDB query execution time metric in prometheus
- MySQL 8 ALGORITHM=INSTANT taking a long time
- MySQL - The password hash doesn't have the expected format
- Is it possible to pass AWS VPC endpoints to overwrite the default ones in Percona
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 # Hahtags
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.