lab_code: "demo_302"
title_en: SQL Workload Replay
title_ja: SQL ワークロードの再生
title_zh: SQL 负载重放
title_ko: SQL 워크로드 재생
description_en: This hands-on lab demonstrates how to replay a SQL workload using TiDB Data Migration and sql-replay utility. Specifically, we will cover how to capture a SQL workload from a MySQL database, replay the SQL workload on a TiDB cluster, and analyze the performance of the TiDB cluster. This lab is a practical workshop that allows you to learn how to replay a SQL workload using TiDB Data Migration and analyze the performance of a TiDB cluster.
description_ja: このハンズオン演習では、TiDB Data Migration と sql-replay ユーティリティを使用して SQL ワークロードを再生する方法を示します。具体的には、MySQL データベースから SQL ワークロードをキャプチャし、TiDB クラスタで SQL ワークロードを再生し、TiDB クラスタのパフォーマンスを分析する方法について説明します。この演習は、TiDB Data Migration を使用して SQL ワークロードを再生し、TiDB クラスタのパフォーマンスを分析する方法を学ぶことができる実践的なワークショップです。
description_zh: 本实验演示了如何使用 TiDB Data Migration 和 sql-replay 工具重放 SQL 负载。具体来说，我们将介绍如何从 MySQL 数据库中捕获 SQL 负载，在 TiDB 集群上重放 SQL 负载，并分析 TiDB 集群的性能。这是一个实践性的研讨会，让您学习如何使用 TiDB Data Migration 重放 SQL 负载并分析 TiDB 集群的性能。
description_ko: 이 실습은 TiDB Data Migration 및 sql-replay 유틸리티를 사용하여 SQL 워크로드를 재생하는 방법을 보여줍니다. 구체적으로, MySQL 데이터베이스에서 SQL 워크로드를 캡처하고, TiDB 클러스터에서 SQL 워크로드를 재생하며, TiDB 클러스터의 성능을 분석하는 방법을 다룹니다. 이 실습은 TiDB Data Migration를 사용하여 SQL 워크로드를 재생하고 TiDB 클러스터의 성능을 분석하는 방법을 배울 수 있는 실습적인 워크샵입니다.
splash_image_en: https://lab-static.pingcap.com/quick-demo/demo_302_en.png
splash_image_ja: https://lab-static.pingcap.com/quick-demo/demo_302_en.png
splash_image_zh: https://lab-static.pingcap.com/quick-demo/demo_302_en.png
splash_image_ko: https://lab-static.pingcap.com/quick-demo/demo_302_en.png
lab_level: Advanced
category_en:
  - Data Migration
category_ja:
  - データ移行
category_zh:
  - 数据迁移
category_ko:
  - 데이터 마이그레이션
authors:
  - Yule Hu (CEG)
  - Bowen Tang (CBG)
  - Todd Bao (CEG)
delivery_type: Self-Paced
tidb_environments:
  - TiDB Self-Managed
target_audience:
  - DBA
  - Architect
  - DevOps
regions:
  aws:
    - oregon
    - tokyo
    - singapore
    - frankfurt
tidb_versions:
  - "8.1.1"
  - "8.5.1"
credits: 10
credit_redeemable: true
employee_only: false
estimated_duration_minutes: 90

topology:
  - role: monitor
    node_count: 1
    web_ssh: true
    web_ssh_name: "TiUP Control Machine"
    ssh_user: ec2-user
  - role: pd
    node_count: 1
  - role: kv
    node_count: 3
  - role: db
    node_count: 1
  - role: mysql
    node_count: 1
    ssh_user: rocky

requirements:
  - type: "CloudStack"

bootstrap:
  - name: "prepare monitor"
    type: "ShellScript"
    target:
      - monitor1
    script: ./scripts/prepare-monitor.sh

  - name: "prepare tidb cluster"
    type: "ShellScript"
    target:
      - monitor1
    script: ./scripts/prepare-tidb.sh

  - name: "prepare mysql"
    type: "ShellScript"
    target:
      - mysql1
    shell: |
      sudo service mysqld start
      echo export PATH=/home/rocky/parse-tshark:/home/rocky/replay:\$PATH >> ~/.bash_profile

features:
  enable_content_explain: false
