lab_code: dba_307_lab_ff0
title_en: "TiDB SQL Tuning Lab 1: Clustered and Non-Clustered Indexes"
title_zh: "TiDB SQL 调优实验 1: 聚簇索引和非聚簇索引"
title_ja: "TiDB SQL チューニング演習 1: CLUSTERED インデックスと NONCLUSTERED インデックス"
title_ko: "TiDB SQL 튜닝 실습 1: 클러스터형 및 비클러스터형 인덱스"
description_en:
  "In this hands-on lab, you will learn how to create clustered and
  non-clustered indexes. Specifically, we will cover the best practices of using clustered
  and non-clustered indexes, split the TiKV regions to prevent hotspots, and use the
  key visualizer. "
description_zh: 在这个实验中，您将学习如何创建聚簇索引和非聚簇索引。具体来说，我们将介绍使用聚簇索引和非聚簇索引的最佳实践、拆分 TiKV 区域以防止热点、使用键可视化器。
description_ja:
  このハンズオン演習では、クラスタ化および非クラスタ化インデックスの作成方法を学びます。具体的には、クラスタ化および非クラスタ化インデックスの最適な使用方法、ホットスポットを防ぐための
  TiKV リージョンの分割、キー ビジュアライザーの使用について説明します。
description_ko:
  이 실습에서는 클러스터형 및 비클러스터형 인덱스를 만드는 방법을 배우게 됩니다. 구체적으로, 클러스터형 및 비클러스터형
  인덱스의 최적 사용 방법, 후크 스폿을 방지하기 위한 TiKV 리전 분할, 키 시각화기 사용에 대해 설명합니다.
splash_image_en: https://lab-static.pingcap.com/quick-demo/307-01.png
splash_image_zh: https://lab-static.pingcap.com/quick-demo/307-01.png
splash_image_ja: https://lab-static.pingcap.com/quick-demo/307-01.png
splash_image_ko: https://lab-static.pingcap.com/quick-demo/307-01.png
external_materials_en:
  - name: "Clustered and Non-Clustered Indexes Deck Template"
    url: https://docs.google.com/presentation/d/1oHzpvp_8mLQifexQ2taJhMOOYBfkbXUX/edit?slide=id.p1#slide=id.p1
    employee_only: true
external_materials_ja:
  - name: "クラスタ化および非クラスタ化インデックスデッキテンプレート"
    url: https://docs.google.com/presentation/d/1eZQYFW07UO5pHEyaWJUrzCq5wDJifVHJ/edit?slide=id.p1#slide=id.p1
    employee_only: true
external_materials_zh:
  - name: "聚簇索引和非聚簇索引演示文稿模板"
    url: https://docs.google.com/presentation/d/1oHzpvp_8mLQifexQ2taJhMOOYBfkbXUX/edit?slide=id.p1#slide=id.p1
    employee_only: true
external_materials_ko:
  - name: "클러스터형 및 비클러스터형 인덱스 템플릿"
    url: https://docs.google.com/presentation/d/1oHzpvp_8mLQifexQ2taJhMOOYBfkbXUX/edit?slide=id.p1#slide=id.p1
    employee_only: true
lab_level: Intermediate
category_en:
  - Application Migration
  - SQL Tuning
category_zh:
  - 应用迁移
  - SQL 调优
category_ja:
  - アプリケーション移行
  - SQL チューニング
category_ko:
  - 애플리케이션 마이그레이션
  - SQL 튜닝
authors:
  - Fei Dong (CEG)
  - Tony Huang (CEG)
delivery_type: Instructor-Led
tidb_environments:
  - TiDB Self-Managed
tidb_versions:
  - 7.5.4
target_audience:
  - Architect
  - Developer
  - DevOps
regions:
  aws:
    - oregon
    - tokyo
    - singapore
    - frankfurt
credits: 1
credit_redeemable: true
employee_only: false
estimated_duration_minutes: 90

requirements:
  - type: CloudStack

topology:
  - role: monitor
    node_count: 1
    ssh_user: ec2-user
    web_ssh: true
  - role: pd
    node_count: 1
  - role: kv
    node_count: 3
  - role: db
    node_count: 2

bootstrap:
  - name: "prepare monitor"
    type: "ShellScript"
    target:
      - monitor1
    script: ./scripts/prepare-monitor.sh
  - name: "prepare tidb"
    type: "ShellScript"
    target:
      - monitor1
    shell: |
      set -e
      /home/ec2-user/create-cluster-vinput.sh ${TIDB_VERSION} ${REGION_NAME} ./solution-topology-seven-nodes.yaml
  - name: "prepare sysbench"
    type: "ShellScript"
    target:
      - monitor1
    script: ./scripts/prepare-sysbench.sh

features:
  enable_content_explain: false
