2033 件中 1671 - 1680 件を表示
« 前の 10 件 | 次の 10 件 »
Displaying posts with tag: MySQL (reset)
[mysql]InnoDBでCOUNTしたくないとき

たとえば、MySQL を使ったお手軽メッセージキュー実装 - ドワンゴ 研究開発ブログに出てくるようなInnoDBをメッセージキューのように使っているときに、キューにどれだけメッセージが溜まってるかを確認したいとき、普通に考えるとCOUNTすると思う。

SELECT COUNT(*) AS count FROM test_queue;

この軽い気持ちでしたCOUNTが、もしうっかりキューに100万レコードぐらいあったりするとInnoDBだとPRIMARYキー総なめとかしちゃってレスポンスにかかる0.1秒ぐらいのあいだ罪悪感に苛まれることでしょう。

[さらに読む]
[mysql]InnoDB PluginとXtraDBのオプションのメモ
  • 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 …
[さらに読む]
[MySQL][Spider]Spider-2.12リリース

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」をご確認下さい。

[さらに読む]
Q4M 0.9.2 prerelease avaiable fixing data corruption on 32bit systems

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 Workbench 5.2についてひとこと言っておくか。

MySQLといえば、コマンドラインで操作するしかできないようなイメージが世間では定着してしまっている気がするのだが、実はちゃんとGUIも存在する。

MySQLはかねてより(MySQL AB時代から)オフィシャルなGUIツールとして、管理ツールとしてMySQL Administrator、SQL文を編集&実行するためのQuery Browser、そして他のRDBMSからの移行ツールであるMigration Toolkitという3つのツールを提供していたのだが、先日それらのツールに対して開発終了のお知らせが出てしまった。

オフィシャルなGUIツールはもう無くなるのか?!!と思ってしまわれるかも知れないが、どうか焦らないで頂きたい。

現在、MySQLが提供するGUIツールとして活発に開発が続けられているものとして、MySQL …

[さらに読む]
[mysql]MariaDBでスレッドプーリングを使うには

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オプション付きでサーバ起動すればスレッドプーリングで使える。

Building a highly configurable, easy-to-maintain backup solution for LVM-based VMs and MySQL databases

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, …
[さらに読む]
それでも私が MySQL を使いつづける理由または、Why I still use MySQL? 的な。

元ネタ: 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 の内部

blockdiff を使ったお手軽ホットバックアップ環境の構築 (Linux, MySQL, etc.)

 一昨日に開催された hbstudy #7 にバックアップの話を聞きに行ってきました。Amanda を中心にした話で、とても勉強になりました。が、設定がめんどくさそうだなぁ、とも。自分の需要にはあわない感じでした。

 勉強会が終わったあとで、自作のバックアップスクリプト blockdiff に関する話を何人かの方とさせていただいたのですが、思いのほか反応が良かったので、あらためて紹介したいと思います。

 blockdiff は、一言でいうと、パーティションやデータベースのデータファイルの差分バックアップツールです。rsnapshot に似ていますが、rsnapshot …

[さらに読む]
SQLインジェクションとは何か?その正体とクラッキング対策。

世間では、今Gumblar祭りが勃発中であり、SQLインジェクションがニュースに出てくることは少なくなったが、だからと言ってSQLインジェクションの脅威がなくなったわけではない。SQLインジェクションはGumblarを仕掛ける手段としても利用されることがあり、Webアプリケーションを提供する全ての人にとって、対策を講じなければいけない驚異であることに変わりはない。SQLインジェクションという攻撃手法が認識され、大いに悪用されているにも係わらず、その本質に迫って解説している記事は少ないように思う。従来のWeb屋だけでなく、今やアプリケーション開発の主戦場はWebであると言っても過言ではなく、そういう意味ではSQLインジェクションについて理解することは、全てのプログラマにとっての嗜みであると言えるだろう。 …

[さらに読む]
2033 件中 1671 - 1680 件を表示
« 前の 10 件 | 次の 10 件 »