最近ボクの中でMySQLが流行っているので、AUTO_INCREMENTの挙動をまとめてみました。ただしInnoDBのとき。他は試してない。 AUTO_INCREMENTを指定したカラムの値は1, 2, 3, ... と連番になるのですが、明示的に指定してINSERTしたときはどうなるのかって話です。 環境はこんな感じ。 OS:WinXP MySQL:4.1.22-community-nt まずはサンプルとして次のテーブルを作りました。 サンプルテーブルのDDL
long_query_time = 0.5 とか閾値を小さめにしてもスロークエリが出なくなったけど、CPU(user)使用率高いとか、なんか足引っ張ってるクエリがあるっぽいなぁという場合のお話です。 「実録」の通り、現在絶賛進行中ですので、逐次動きがあったら書き足していくつもりです。 「あれを見た方がいい」とか「これをあーした方がいい」とかあれば、コメントかTwitterで @hirose31 までお知らせいただけるとうれしいです! 使用しているのは、MySQL 5.1.41 です。 前提: サーバーリソースのグラフ GangliaでもCactiでもMuninでもなんでもいいんですが、サーバリソースのグラフ化は必須です。チューニングした際の効果測定や、そろそろリソース食い潰してやばいとかの予測にも使えます。 自分はDBサーバの場合このあたりをグラフ化してます。 CPU使用率 (user,
Mac mini サーバにmysqlをインストールする。今回はmysql.comからバイナリ/ソース/パッケージをダウンロードせず、Macportsを使ってインストールしてみよう。 [yuanying@Magnus ~]$sudo port -uv install mysql5 +server Password: ... (中略) ... ---> Creating launchd control script ########################################################### # A startup item has been generated that will aid in # starting mysql5 with launchd. It is disabled # by default. Execute the follow
一から作り直し。。。 まだまだLeopardでの開発環境設計で頭を悩ませております。。。 ApacheとかPHPとかデフォルトで入っているもののままの方がいいのかどうか すごい頭の悩ませどころではあります。 といいつつまだ入っていないMySQLからインストールすることに。 でもdmg版はまだリリースされていないので、 Macportsからインストールすることにしました。 まずはMacPortsから、 Leopard対応のdmg版をダウンロードして、そのままマウントし、 インストーラに沿ってインストール。 sudoで管理者ユーザに変更 # sudo -s Macportsはすべて/opt/local/にインストールされるので、 PATHを設定する # vi ~./.bash_profile export PATH=/opt/local/bin:/opt/local/sbin:$PATH イン
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く