percona-toolkit-recipes

Plan safe Percona Toolkit workflows for live MySQL deployments.

1|1|Updated May 29, 2026
One-click install
npx skills add https://github.com/Percona-Lab/skills --skill percona-toolkit-recipes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: percona-toolkit-recipes
Source: https://github.com/Percona-Lab/skills/tree/main/percona-toolkit-recipes
Command: npx skills add https://github.com/Percona-Lab/skills --skill percona-toolkit-recipes

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides a practical, safety-first playbook for using Percona Toolkit tools (pt-osc, pt-archiver, pt-query-digest, etc.) to perform live database operations without surprises, reducing downtime and risk.

Core Features & Use Cases

  • Guidance on selecting the right toolkit for common DB tasks (online schema changes, archiving, slow-log analysis, replica validation, and diagnostics).
  • Safety-first best practices, including mandatory dry-run checks and preference for native DDL before resorting to toolkit-based changes.
  • Real-world scenarios and stepwise strategies to minimize downtime on large production tables.

Quick Start

Outline a safe online schema-change plan for a large table using pt-online-schema-change with a dry-run.

Frequently Asked Questions about percona-toolkit-recipes

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I perform an online schema change on a large MySQL table safely?

To perform an online schema change safely, use pt-online-schema-change with a mandatory dry-run first to verify the operation. This approach minimizes downtime on large production tables by planning stepwise strategies and enforcing safety constraints before executing live modifications.

What is the best way to archive or delete rows from a large production MySQL database?

The best way to archive or delete rows safely is using pt-archiver to manage row deletion incrementally. This reduces locking risk on live databases by providing guidance on tool selection, flags, and potential risks to ensure safe archival workflows.

When should I prefer native online DDL over Percona Toolkit for schema changes?

You should prefer native online DDL when the database version supports the required operation natively. Resorting to toolkit-based changes like pt-osc is recommended only when native DDL is not possible or fails to execute without locking.

How do I analyze slow queries in MySQL using Percona Toolkit?

To analyze slow queries, use pt-query-digest to parse slow-query logs and collect diagnostic data. This helps operators identify performance bottlenecks by providing a practical, safety-first playbook for slow-log analysis and diagnostic data collection.

Does Percona Toolkit require a dry-run before executing live database operations?

Yes, Percona Toolkit requires a dry-run or print check first to enforce safety constraints. This mandatory step ensures operators can review tool selection, flags, and potential risks before executing workflows on live MySQL deployments.

What are the limitations of using pt-online-schema-change for replication verification?

For replica verification, pt-online-schema-change is not the correct tool; instead, use specific replica validation tools. Limitations include potential risks on production databases, which is why the toolkit enforces dry-run checks and provides guidance on selecting the right tool for the task.