日経ソフトウエア 2010年 01月号
[雑誌]
日経ソフトウエアの新年号には「データベースまるごと学習ブック」というMySQL/PostgreSQLをつかった付録がついていました。過去記事をうまくまとめてわかりやすいのだけれども、過去記事ゆえに現状とそぐわないところ、間違っているところがいくつかありましたので、ここでMySQL関連だけ勝手に校正しておきます。(インストール記事が5.1.40を利用しているので、それを前提とします)
(1) データ型の決定(p.12)
…
Engine Independent Testというものを作り始めました。
http://launchpad.net/engineindependenttestformysql
これは、どんなストレージエンジンでも試験可能なテストを目指すもので、現在数多くあるストレージエンジン全体の品質の確認と担保を容易にすることを目的としています。
草案は以下のwikiにあがっていたのですが、まだ作られてはいないようだったので、私が既に複数のストレージエンジンをリリースしておりそこで必要だったということもあり、作りはじめてみることにしました。
http://forge.mysql.com/wiki/EngineIndependentTestSuite
…
たとえば、MySQL を使ったお手軽メッセージキュー実装 - ドワンゴ 研究開発ブログに出てくるようなInnoDBをメッセージキューのように使っているときに、キューにどれだけメッセージが溜まってるかを確認したいとき、普通に考えるとCOUNTすると思う。
SELECT COUNT(*) AS count FROM test_queue;
この軽い気持ちでしたCOUNTが、もしうっかりキューに100万レコードぐらいあったりするとInnoDBだとPRIMARYキー総なめとかしちゃってレスポンスにかかる0.1秒ぐらいのあいだ罪悪感に苛まれることでしょう。
…
[さらに読む]- mysql 5.1.42
- InnoDB Plugin 1.0.6
- XtraDB 1.0.6-9
の場合。
InnoDB -> InnoDB Pluginで増えたオプション
innodb_adaptive_flushing ON innodb_change_buffering inserts innodb_file_format Antelope innodb_file_format_check Antelope innodb_io_capacity 200 innodb_old_blocks_pct 37 innodb_old_blocks_time 0 innodb_read_ahead_threshold 56 innodb_read_io_threads 4 innodb_replication_delay 0 innodb_spin_wait_delay 6 innodb_stats_sample_pages 8 innodb_strict_mode OFF innodb_use_sys_malloc ON innodb_write_io_threads 4
InnoDB Plugin -> XtraDBで増えたオプション
innodb_adaptive_checkpoint estimate innodb_checkpoint_age_target 0 innodb_dict_size_limit 0 innodb_enable_unsafe_group_commit 0 innodb_expand_import 0 innodb_extra_rsegments 0 innodb_extra_undoslots OFF innodb_fast_recovery ON …[さらに読む]
Spiderストレージエンジンのバージョン 2.12(beta)をリリースしました。
Spiderストレージエンジンは、database sharding用のストレージエンジンです。
http://spiderformysql.com/
今回の主な変更は以下です。
MariaDBに対応しました。
・サーバパラメータに「spider_connect_mutex」「spider_connect_retry_count」「spider_connect_retry_interval」を追加しました。
これらのパラメータは、接続処理が激しくなった際に起こる接続失敗に対応するためのものです。(この現象は特に「spider_conn_recycle_mode=0」を利用している場合に発生します)
それ以外の変更については、ダウンロードドキュメント中の「99_change_logs.txt」をご確認下さい。
…
Thanks to a user of Q4M, I have found a bug that would likely lead to data corruption on 32bit versions of Q4M. 64bit versions are unaffected.
Q4M by default uses mmap(2) to read from data files. On 32bit systems, it tries to map max. 1GB per each table into memory using mmap. When mmap fails to map memory due to low memory, Q4M falls back to file I/O to read the data.
However there was a bug in handling the response from mmap, that led to reading corrupt data from database files when mmap(2) failed after the size of the underlying file was grown / shrunk by Q4M. And since Q4M writes back the corrupt data into the database file when rows are being consumed, the bug will likely destroy the database files.
I have fixed the bug and have uploaded Q4M 0.9.2, into the prerelease directory at …
[さらに読む]MySQLといえば、コマンドラインで操作するしかできないようなイメージが世間では定着してしまっている気がするのだが、実はちゃんとGUIも存在する。
MySQLはかねてより(MySQL AB時代から)オフィシャルなGUIツールとして、管理ツールとしてMySQL Administrator、SQL文を編集&実行するためのQuery Browser、そして他のRDBMSからの移行ツールであるMigration Toolkitという3つのツールを提供していたのだが、先日それらのツールに対して開発終了のお知らせが出てしまった。
オフィシャルなGUIツールはもう無くなるのか?!!と思ってしまわれるかも知れないが、どうか焦らないで頂きたい。
現在、MySQLが提供するGUIツールとして活発に開発が続けられているものとして、MySQL …
[さらに読む]configureオプションで--with-libeventを指定してbuildしないとスレッドプーリングは使えナッシブルです!
とりあえず自分のmacbookには以下のようにして入れてます。
./configure --prefix=/usr/local/mariadb --with-charset=utf8 --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --with-pic --with-big-tables --with-readline --with-embedded-server --with-plugins=all --without-docs --with-libevent --with-debug make sudo make install
linux用のバイナリパッケージは--with-libevent付きなので展開してそのまま使って大丈夫。
んで、デフォルトのthread_handlingはone-thread-per-connectionなので、--thread_handling=pool-of-threadsオプション付きでサーバ起動すればスレッドプーリングで使える。
Motives and the Features
For the servers running in our new network, I was in need for a highly configurable, but easy-to-use backup solution that can take online backups of VMs and MySQL databases running multiple storage engines.
Since my colleagues are all researchers or programmers but there are no dedicated engineers for managing our system, I decided to write a set of command line scripts to accomplish the task instead of using an existing, highly-configurable but time-taking-to-learn backup solutions, like Amanda.
And what I have come up with now is a backup solution with following characteristics, let me introduce them.
- a central backup server able to take backup of other servers over SSH using public-key authentication
- no need to install backup agents into each server
- LVM snapshot-based online, …
元ネタ: Why I still use Perl5? - TokuLog 改めB日記 ===> それでも私が Perl を使いつづける理由 - kazuhoのメモ置き場
なんつーかノリが楽しそうだったのでMySQLで便乗。Perlのことはよく分からないけど。
Fast Enoughもっとはやいといいな、とおもうときはあるけど、他の RDB とくらべても速い部類。
GPLであるいろんなライブラリを組み合わせるときにはライセンスを考えるのが面倒臭いけど、自分の書いたコードがプロプラエタリにならないとか、ユーザーの利用に制限がないとか、GPLの利点も多い。
MySQL community is so goodMySQL コミュニティは質問とかにもわりと答えてくれるし、一緒に仕事してて楽しいですね。
I know MySQL Internals個人的な理由だけど、MySQL の内部