Skip to main content

2. pt-archive

In this test case, data exchange from one table to another in the same db on same server

  • Create a new table
    USE sakila;
    CREATE TABLE old_rental LIKE rental;
    SELECT COUNT(*) FROM rental WHERE rental_date < "2006-01-01";
    SELECT * FROM old_rental;