{
  "id": 7498769,
  "title": "「先頭カラムが同じインデックス、それ1つ無駄ちゃう？」— 冗長インデックスの見つけ方と消し方",
  "url": "https://urgent.news/2026/09/15/1-7498769",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-15T07:02:01.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/kaziusan/xian-tou-karamugatong-ziindetukusu-sore1tuwu-tuo-tiyau-rong-chang-indetukusunojian-tukefang-toxiao-sifang-13g7"
  },
  "original_language": "ja",
  "account": "The article discusses the issue of redundant indexes in databases, specifically focusing on MySQL. It explains that a redundant index occurs when a single-column index is included in a composite index, which can be unnecessary as the single-column index can be used for lookups that the composite index can also satisfy. The article provides a method to identify and remove these redundant indexes using MySQL's standard view `sys.schema_redundant_indexes` or tools like `pt-duplicate-key-checker` and `sys.schema_unused_indexes`. It also highlights the importance of not removing redundant indexes that are part of a foreign key constraint, as doing so can cause an error. The article concludes by demonstrating a safe way to drop a redundant index using ActiveRecord migration.",
  "summary": "テーブルのインデックスを眺めていて、こんな2本が並んでいるのを見つけたことはないだろうか。 KEY `idx_logs_on_import_id` ( `import_id` ) UNIQUE KEY `idx_logs_on_import_id_and_file` ( `import_id` , `file_path` ) 結論から言うと、 上の単独インデックスはたいてい消せる 。この記事では「なぜ消せるのか」「本当に消していいのか（消せない例外）」「どう機械的に見つけるか」「安全な消し方」までを一通りまとめる。 なぜ「単独 (import_id) 」が冗長なのか ポイントは 複合インデックスの “左端プレフィックス（leftmost prefix）” は、単独インデックスとしても使える という B-Tree インデックスの性質だ。 (import_id, file_path)…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 3,
    "also_reported_by": [
      {
        "outlet": "Hankyoreh",
        "title": "이형일 “거주 중심 주택 문화 목표”…‘과천 비거주 1주택’ 논란엔 “재건축 되면 실입주”",
        "url": "https://urgent.news/2026/09/15/1-7496038",
        "published": "2026-09-15T05:15:04.000Z"
      },
      {
        "outlet": "The Asahi Shimbun",
        "title": "ふるさと納税、手数料引き下げ回答「1社」 林総務相「大変残念」",
        "url": "https://urgent.news/2026/09/15/1",
        "published": "2026-09-15T06:34:03.000Z"
      }
    ]
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}