LoginSignup
10
10

More than 5 years have passed since last update.

よく使うinformation_schemaのテーブルまとめ

Last updated at Posted at 2014-04-04

よく使うテーブルのメモ(後で整理する)
テーブルの中身については見ればわかるので割愛。

tables、columns

名前の通りテーブルやカラムの情報がおさめられている。
主にカラムのリネーム時などに影響範囲の調査でお世話になる。
あとは桁数がそろっているか等。
シェルスクリプトから呼び出して利用することもしばしば

processlist

show processlistと基本的には同じ。
ただし、where句が使えるので、host等で抽出できるのが便利。

statistics

インデックス情報が登録されている。
↑の2つと合わせて開発環境、本番環境で違いがないか調べたりする時に便利。

referential_constraints

外部キー制約情報が登録されている。
どのデータを消すとどこに影響があるかがわかるので便利。

10
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
10